/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
     M o d u l e :   B W I N - C A P I . T X T 
 
                     A l l   c o m m a n d s   f o r   P P L B   i n   D y n a m i c   L i n k   L i b r a r y   f o r   W i n d o w s 
 
     N o t i c e s :   C o p y r i g h t   ( c )   1 9 9 8 - 2 0 1 3   A R G O X 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / 
 
     v
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 ( 0 1 ) B _ B a r 2 d _ M a x i ( )                             = >   pSQ NP  M a x i   C o d e   2 D   B a r c o d e 0
 
 ( 0 2 ) B _ B a r 2 d _ P D F 4 1 7 ( )                         = >   pSQ NP  P D F - 4 1 7   2 D   B a r c o d e 0
 
 ( 0 3 ) B _ B a r 2 d _ P D F 4 1 7 _ N ( )                     = >   pSQ NP  P D F - 4 1 7   2 D   B a r c o d e 0
 
 ( 0 4 ) B _ C l o s e P r n ( )                                 = >   ܕ  P r i n t e r   ]\O0
 
 ( 0 5 ) B _ C r e a t e P r n ( )                               = >   _U  P r i n t e r   ]\O0
 
 ( 0 6 ) B _ D e l _ F o r m ( )                                 = >   *Rd  F o r m   ( h<h) 0
 
 ( 0 7 ) B _ D e l _ P c x ( )                                   = >   *Rd  P c x   Wj0
 
 ( 0 8 ) B _ D r a w _ B o x ( )                                 = >   ku NPFh0
 
 ( 0 9 ) B _ D r a w _ L i n e ( )                               = >   ku Nh}0
 
 ( 1 0 ) B _ E r r o r _ R e p o r t i n g ( )                   = >   _Ubܕ/VPR0
 
 ( 1 1 ) B _ G e t _ D L L _ V e r s i o n ( )                   = >   S_byQdkQxe^Hr,gǌ
0
 
 ( 1 2 ) B _ G e t _ D L L _ V e r s i o n A ( )                 = >   S_byQdkQxe^Hr,gǌ
0
 
 ( 1 3 ) B _ G e t _ G r a p h i c _ C o l o r B M P ( )         = >   Ic  B M P   Wji_rpp&N\Wb_2QX[(WpSh_jgQv  R A M 0
 
 ( 1 4 ) B _ G e t _ P c x ( )                                   = >   RpS NPWb_&N\Wb_2QX[(WpSh_jgQv  M e m o r y 0
 
 ( 1 5 ) B _ I n i t i a l _ S e t t i n g ( )                   = >   MRnUt0
 
 ( 1 6 ) B _ L o a d _ P c x ( )                                 = >   RpS NPWb_0
 
 ( 1 7 ) B _ O p e n _ C h i n e s e F o n t ( )                 = >   _UO(u-NeޞwcW[WjHh  ( 1 6 * 1 5   T  2 4 * 2 4 ) 0
 
 ( 1 8 ) B _ P r i n t _ F o r m ( )                             = >   RpS NP  F O R M   ( h<h) &N8eQ  F O R M   @b	gxe0xeǌe0
 
 ( 1 9 ) B _ P r i n t _ M C o p y ( )                           = >   RpS@b	gǌeTR
N_R0
 
 ( 2 0 ) B _ P r i n t _ O u t ( )                               = >   RpS@b	gǌe0
 
 ( 2 1 ) B _ P r n _ B a r c o d e ( )                           = >   pSQ NPhxTR
N_R0
 
 ( 2 2 ) B _ P r n _ C o n f i g u r a t i o n ( )               = >   RpSpSh_jgQMn0
 
 ( 2 3 ) B _ P r n _ T e x t ( )                                 = >   pSQ NLeW[TR
N_R0
 
 ( 2 4 ) B _ P r n _ T e x t _ C h i n e s e ( )                 = >   pSQ NLeW[O(u-NeޞwcW[WjHh  ( 1 6 * 1 5   b  2 4 * 2 4 ) 0
 
 ( 2 5 ) B _ P r n _ T e x t _ T r u e T y p e ( )               = >   pSQ NL  T r u e   T y p e   F o n t   eW[0
 
 ( 2 6 ) B _ P r n _ T e x t _ T r u e T y p e _ W ( )           = >   pSQ NL  T r u e   T y p e   F o n t   eW[&Nc6RW[Wv[Sؚ0
 
 ( 2 7 ) B _ S e l e c t _ O p t i o n ( )                       = >   -[IpS!j_0_UR  C u t t e r   b  P e e l 0
 
 ( 2 8 ) B _ S e l e c t _ O p t i o n 2 ( )                     = >   -[IpS!j_0_UR  C u t t e r   b  P e e l 0
 
 ( 2 9 ) B _ S e l e c t _ S y m b o l ( )                       = >   &{_-[xd0
 
 ( 3 0 ) B _ S e l e c t _ S y m b o l 2 ( )                     = >   &{_-[xd0
 
 ( 3 1 ) B _ S e t _ B a c k f e e d ( )                         = >   _UR  B a c k   f e e d 0
 
 ( 3 2 ) B _ S e t _ B M P S a v e ( )                           = >   2QX[q_PWj0
 
 ( 3 3 ) B _ S e t _ D a r k n e s s ( )                         = >   -[qa-RpSq^0
 
 ( 3 4 ) B _ S e t _ D e b u g D i a l o g ( )                   = >   -[d/tX0
 
 ( 3 5 ) B _ S e t _ D i r e c t i o n ( )                       = >   -[RpSeT0
 
 ( 3 6 ) B _ S e t _ F o r m ( )                                 = >   2QX[&NRpS  F O R M   ( h<h) 0
 
 ( 3 7 ) B _ S e t _ L a b g a p ( )                             = >   TBf-[jd|w^S  G A P   w^0
 
 ( 3 8 ) B _ S e t _ L a b w i d t h ( )                         = >   -[jd|[^0
 
 ( 3 9 ) B _ S e t _ O r i g i n p o i n t ( )                   = >   -[YRpSޞ0
 
 ( 4 0 ) B _ S e t _ P r n c o m p o r t ( )                     = >   -[  S e r i a l   P o r t 0
 
 ( 4 1 ) B _ S e t _ P r n c o m p o r t _ P C ( )               = >   -[  P C   ^RW0
 
 ( 4 2 ) B _ S e t _ S p e e d ( )                               = >   -[RpS^0
 
 ( 4 3 ) B _ S e t _ P r o c e s s D l g ( )                     = >   _Ubܕ2^
\qFh
 
 ( 4 4 ) B _ G e t U S B B u f f e r L e n ( )                   = >   gb  U S B   Wǌew^
 
 ( 4 5 ) B _ E n u m U S B ( )                                   = >   S_  U S B   Wvǌe
 
 ( 4 6 ) B _ C r e a t e U S B P o r t ( )                       = >   O(u  U S B   W2LP8
 
 ( 4 7 ) B _ R e s e t P r i n t e r ( )                         = >   OpSh_j͑e_j
 
 ( 4 8 ) B _ G e t P r i n t e r R e s p o n s e ( )             = >   SpSh_j/Nx
 
 ( 4 9 ) B _ T F e e d M o d e ( )                               = >   T   F e e d !j_Rc
 
 ( 5 0 ) B _ T F e e d T e s t ( )                               = >   T   F e e d !j_}5_,nf
 
 ( 5 1 ) B _ C r e a t e P o r t ( )                             = >   _UP8W2LP8
 
 ( 5 2 ) B _ E x e c u t e _ F o r m ( )                         = >   RpS NP]X[(WRh_jgQv  F O R M   ( h<h) &N8eQ  F O R M   @b	gxe0xeǌe0
 
 ( 5 3 ) B _ B a r 2 d _ Q R ( )                                 = >   RpS  Q R   hx  
 
 ( 5 4 ) B _ G e t N e t P r i n t e r B u f f e r L e n ( )     = >   gb  N e t   P r i n t e r vǌew^0
 
 ( 5 5 ) B _ E n u m N e t P r i n t e r ( )                     = >   S_  N e t   P r i n t e r vǌe0
 
 ( 5 6 ) B _ C r e a t e N e t P o r t ( )                       = >   O(u  N e t   W2LP80
 
 ( 5 7 ) B _ P r n _ T e x t _ T r u e T y p e _ U n i ( )       = >   pSQ NL1uU n i c o d e }xeW[@bIbv  T r u e   T y p e   F o n t   eW[0
 
 ( 5 8 ) B _ P r n _ T e x t _ T r u e T y p e _ U n i B ( )     = >   pSQ NL1uU n i c o d e }xeW[@bIbv  T r u e   T y p e   F o n t   eW[0    
 
 ( 5 9 ) B _ G e t U S B D e v i c e I n f o ( )                 = >   S_  U S B   Wv݈n
T1zT݈n_0
 
 ( 6 0 ) B _ G e t _ G r a p h i c _ C o l o r B M P E x ( )     = >   Ic  B M P   Wji_rpp&N\Wb_2QX[(WpSh_jgQv  R A M 0
 
 ( 6 1 ) B _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( )   = >   Ic  B M P   Wji_rpp&N\Wb_2QX[(WpSh_jgQv  R A M 0
 
 ( 6 2 ) B _ W r i t e D a t a ( )                               = >   (uOzsS\ǌePQbfBf[eQfX[@S-N0
 
 ( 6 3 ) B _ R e a d D a t a ( )                                 = >   S_pSh_j-Nvǌe0
 
 ( 6 4 ) B _ S e t _ E n c r y p t i o n K e y ( )               = >   -[R[pSv<P0
 
 ( 6 5 ) B _ C h e c k _ E n c r y p t i o n K e y ( )           = >   xR[pSvckx'`0
 
 ( 6 6 ) B _ S e t _ E r r o r D l g ( )                         = >   _Ubܕ͑fbOUz0
 
 ( 6 7 ) B _ B a r 2 d _ D a t a M a t r i x ( )                 = >   RpS  D a t a   M a t r i x   hx0
 
 ( 6 8 ) B _ S e t _ B a c k f e e d _ O f f s e t ( )           = >   -[  B a c k   F e e d   OPyϑ( S(ued}!j_) . 
 
 ( 6 9 ) B _ S e t _ C u t P e e l _ O f f s e t ( )             = >   -[Rb]R}OPyϑ( S(ueR/ ]R}!j_) . 
 
 ( 7 0 ) B _ S e t _ C o m m T i m e o u t ( )                   = >   -[OvBf. 
 
 ( 7 1 ) B _ G e t _ C o m m T i m e o u t ( )                   = >   S_OvBf. 
 
 ( 7 2 ) B _ S e t _ L a b e l F o r S m a r t P r i n t ( )     = >   -[  S m a r t   P r i n t   -N@b vǌ
. 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
     laN
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 1 . `Oar\D L L jHh>en(WTRQ? 
 
     O(u3 2 MOCQvD L L : 
 
     A . \D L L jHhTa(uz_>e(WT NvN. ( /f g}Yvel) 
 
     B . (WW i n d o w s   3 2 MOCQ\Omi|q}-N,   \D L L jHh>en(W\ W i n d o w s \ S y s t e m 3 2 v. 
 
     C . (WW i n d o w s   6 4 MOCQ\Omi|q}-N,   \D L L jHh>en(W\ W i n d o w s \ S y s w o w 6 4 v. 
 
     O(u6 4 MOCQvD L L : 
 
     A . \D L L jHhTa(uz_>e(WT NvN. ( /f g}Yvel) 
 
     B . (WW i n d o w s   3 2 MOCQ\Omi|q}-N,   !qlO(u  6 4 MOCQvD L L . 
 
     C . (WW i n d o w s   6 4 MOCQ\Omi|q}-N,   \D L L jHh>en(W\ W i n d o w s \ S y s w o w 3 2 v. 
 
 2 . NN{Op  V i s u a l   C + +   S  V i s u a l   B a s i c   v{O, vQNz_ 
N N[[hQvT0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ G e t U S B B u f f e r L e n ( ) 
 
 B _ E n u m U S B ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R  S_  U S B   P r i n t e r   v݈n
T1zSǌew^0
 
 
 
 l
 
     V C : 
 
         i n t   B _ G e t U S B B u f f e r L e n ( v o i d ) ; 
 
         i n t   B _ E n u m U S B ( c h a r   * b u f ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ G e t U S B B u f f e r L e n ( )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   B _ E n u m U S B ( B y V a l   b u f   A s   S t r i n g )   A s   L o n g 
 
     V B : 
 
         D e c l a r e   F u n c t i o n   B _ G e t U S B B u f f e r L e n ( )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   B _ E n u m U S B ( B y V a l   b u f   A s   B y t e ( ) )   A s   I n t e g e r 
 
 
 
 Sxe
 
         b u f ; 
 
             2QX[  U S B   P r i n t e r   ǌe0
 
 
 
 PV<P
 
         B _ G e t U S B B u f f e r L e n ( ) ;     PV  U S B   P r i n t e r vǌew^0
 
         B _ E n u m U S B ( )   0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         c h a r   * p b u f ; 
 
         i n t   n L e n   =   B _ G e t U S B B u f f e r L e n ( )   +   1 ; 
 
         i f   ( n L e n   >   1 )   { 
 
             p b u f   =   ( c h a r   * ) n e w   c h a r [ n L e n ] ; 
 
             B _ E n u m U S B ( p b u f ) ; 
 
         } 
 
     V B :   V B A : 
 
         D i m   n L e n   A s   L o n g 
 
         D i m   p b u f   A s   S t r i n g 
 
         n L e n   =   B _ G e t U S B B u f f e r L e n ( )   +   1 
 
         I f   n L e n   >   1   T h e n 
 
             p b u f   =   S p a c e ( 1 2 8 ) 
 
             C a l l   B _ E n u m U S B ( p b u f ) 
 
         E n d   I f 
 
     V B . n e t : 
 
         D i m   n L e n   A s   I n t e g e r 
 
         D i m   p b u f ( 1 2 8 )   A s   B y t e 
 
         n L e n   =   B _ G e t U S B B u f f e r L e n ( )   +   1 
 
         I f   n L e n   >   1   T h e n 
 
             C a l l   B _ E n u m U S B ( p b u f ) 
 
         E n d   I f 
 
 
 
 f  iQPQxe/f ND}vQxe0HQ(u  B _ G e t U S B B u f f e r L e n ( )   S_  U S B   P8Wvǌe
 
         w^,   6q_QMaԚf}  B _ E n u m U S B ( )   2QX[  U S B   Wvǌe0U S B   Wvǌe/fN
 
         ( " 0 x 0 d 0 x 0 a " ) ZPR, 	OO,   Ygǌe/f  A - 2 0 0 ( 0 x 0 d ) ( 0 x 0 a ) R - 4 0 0 Z I P vqh:y  
 
         U S B 1   /fc  A - 2 0 0 ,   U S B 2   /fc  R - 4 0 0 Z i p 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ G e t U S B D e v i c e I n f o ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R  S_  U S B   P r i n t e r v݈n
T1zT݈n_0
 
 
 
 l
 
     V C : 
 
         i n t   B _ G e t U S B D e v i c e I n f o ( i n t   n P o r t ,   c h a r   * p D e v i c e N a m e ,   i n t   * p D e v i c e N a m e L e n ,   
 
             c h a r   * p D e v i c e P a t h ,   i n t   * p D e v i c e P a t h L e n ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ G e t U S B D e v i c e I n f o ( B y V a l   n P o r t   A s   L o n g ,   _ 
 
             B y V a l   p D e v i c e N a m e   A s   S t r i n g ,   B y R e f   p D e v i c e N a m e L e n   A s   L o n g ,   _ 
 
             B y V a l   p D e v i c e P a t h   A s   S t r i n g ,   B y R e f   p D e v i c e P a t h L e n   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ G e t U S B D e v i c e I n f o ( B y V a l   n P o r t   A s   I n t e g e r ,   _ 
 
             B y V a l   p D e v i c e N a m e   A s   B y t e ( ) ,   B y R e f   p D e v i c e N a m e L e n   A s   I n t e g e r ,   _ 
 
             B y V a l   p D e v i c e P a t h   A s   B y t e ( ) ,   B y R e f   p D e v i c e P a t h L e n   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n P o r t ; 
 
             c[S_ǌevU S B   p r i n t e r ,   1u1 Y. 
 
         p D e v i c e N a m e ; 
 
             2QX[U S B   p r i n t e r v݈n
T1z,   8eQBfpzzcj,   GR
NkXǌe. 
 
         p D e v i c e N a m e L e n ; 
 
             |TSQ_BfkXeQp D e v i c e N a m e fX[@Svw^;   8QBfGRgVP݈n
T1zvw^. 
 
         p D e v i c e P a t h ; 
 
             2QX[U S B   p r i n t e r v݈n_,   8eQBfpzzcj,   GR
NkXǌe. 
 
         p D e v i c e P a t h L e n ; 
 
             |TSQ_BfkXeQp D e v i c e P a t h fX[@Svw^;   8QBfGRgVP݈n_vw^. 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         c h a r   b u f 1 [ 1 2 8 ] = { 0 } ,   b u f 2 [ 1 2 8 ] = { 0 } ; 
 
         i n t   n L e n 1 = 1 2 8 ,   n L e n 2 = 1 2 8 ,   n l e n ; 
 
         n l e n   =   B _ G e t U S B B u f f e r L e n ( )   +   1 ; 
 
         i f   ( n l e n   >   1 )   { 
 
             B _ G e t U S B D e v i c e I n f o ( 1 ,   b u f 1 ,   & n L e n 1 ,   b u f 2 ,   & n L e n 2 ) ; 
 
             B _ C r e a t e P r n ( 1 2 ,   b u f 2 ) ;   / / o r   B _ C r e a t e P o r t ( 6 ,   0 ,   b u f 2 ) ; 
 
         } 
 
     V B :   V B A : 
 
         D i m   b u f 1   A s   S t r i n g 
 
         D i m   b u f 2   A s   S t r i n g 
 
         D i m   n L e n 1 ,   n L e n 2 ,   n l e n   A s   L o n g 
 
 
 
         n l e n   =   B _ G e t U S B B u f f e r L e n ( )   +   1 
 
         I f   n l e n   >   1   T h e n 
 
             n L e n 1   =   1 2 8 
 
             n L e n 2   =   1 2 8 
 
             b u f 1   =   S p a c e ( n L e n 1 ) 
 
             b u f 2   =   S p a c e ( n L e n 2 ) 
 
             C a l l   B _ G e t U S B D e v i c e I n f o ( 1 ,   b u f 1 ,   n L e n 1 ,   b u f 2 ,   n L e n 2 ) 
 
             C a l l   B _ C r e a t e P r n ( 1 2 ,   b u f 2 )   ' o r   C a l l   B _ C r e a t e P o r t ( 6 ,   0 ,   b u f 2 ) 
 
         E n d   I f 
 
     V B . n e t : 
 
         D i m   b u f 1 ( )   A s   B y t e 
 
         D i m   b u f 2 ( )   A s   B y t e 
 
         D i m   n L e n 1 ,   n L e n 2 ,   n l e n   A s   I n t e g e r 
 
         D i m   e n c A s c I I   =   S y s t e m . T e x t . E n c o d i n g . A S C I I 
 
 
 
         n l e n   =   B _ G e t U S B B u f f e r L e n ( )   +   1 
 
         I f   n l e n   >   1   T h e n 
 
             n L e n 1   =   1 2 8 
 
             n L e n 2   =   1 2 8 
 
             R e D i m   b u f 1 ( n L e n 1 ) 
 
             R e D i m   b u f 2 ( n L e n 2 ) 
 
             C a l l   B _ G e t U S B D e v i c e I n f o ( 1 ,   b u f 1 ,   n L e n 1 ,   b u f 2 ,   n L e n 2 ) 
 
             C a l l   B _ C r e a t e P r n ( 1 2 ,   e n c A s c I I . G e t S t r i n g ( b u f 2 ,   0 ,   n L e n 2 ) ) 
 
             ' o r   C a l l   B _ C r e a t e P o r t ( 6 ,   0 ,   e n c A s c I I . G e t S t r i n g ( b u f 2 ,   0 ,   n L e n 2 ) ) 
 
         E n d   I f 
 
 
 
 f  dkQ_HQ|TS  B _ G e t U S B B u f f e r L e n ( )   S_  U S B   p r i n t e r vǌew^,   6q_Q|TS  
 
         B _ G e t U S B D e v i c e I n f o ( )   S_  U S B   p r i n t e r vvܕǌe0
 
         p D e v i c e P a t h @b2QX[vǌe/fU S B v݈n_,   S(u(WB _ C r e a t e P r n ( ) SB _ C r e a t e P o r t ( ) 
 
         O_UU S B ݈n0
 
         
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ G e t N e t P r i n t e r B u f f e r L e n ( ) 
 
 B _ E n u m N e t P r i n t e r ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R  S_  N e t   P r i n t e r   v݈n
T1zSǌew^0
 
 
 
 l
 
     V C : 
 
         i n t   B _ G e t N e t P r i n t e r B u f f e r L e n ( v o i d ) ; 
 
         i n t   B _ E n u m N e t P r i n t e r ( c h a r   * b u f ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ G e t N e t P r i n t e r B u f f e r L e n ( )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   B _ E n u m N e t P r i n t e r ( B y V a l   b u f   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ G e t N e t P r i n t e r B u f f e r L e n ( )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   B _ E n u m N e t P r i n t e r ( B y V a l   b u f   A s   B y t e ( ) )   A s   I n t e g e r 
 
 
 
 Sxe
 
         b u f ; 
 
             2QX[  N e t   P r i n t e r   ǌe0
 
 
 
 PV<P
 
         B _ G e t N e t P r i n t e r B u f f e r L e n ( ) ;     PV  N e t   P r i n t e r   vǌew^. 
 
         B _ E n u m N e t P r i n t e r ( ) ;     0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         c h a r   * p b u f ; 
 
         i n t   n L e n   =   B _ G e t N e t P r i n t e r B u f f e r L e n ( )   +   1 ; 
 
         i f   ( n L e n   >   1 )   { 
 
             p b u f   =   ( c h a r   * ) n e w   c h a r [ n L e n ] ; 
 
             B _ E n u m N e t P r i n t e r ( p b u f ) ; 
 
         } 
 
     V B :   V B A : 
 
         D i m   n L e n   A s   L o n g 
 
         D i m   p b u f   A s   S t r i n g 
 
         n L e n   =   B _ G e t N e t P r i n t e r B u f f e r L e n ( )   +   1 
 
         I f   n L e n   >   1   T h e n 
 
             p b u f   =   S p a c e ( 1 2 8 ) 
 
             C a l l   B _ E n u m N e t P r i n t e r ( p b u f ) 
 
         E n d   I f 
 
     V B . n e t : 
 
         D i m   n L e n   A s   I n t e g e r 
 
         D i m   p b u f ( 1 2 8 )   A s   B y t e 
 
         n L e n   =   B _ G e t N e t P r i n t e r B u f f e r L e n ( )   +   1 
 
         I f   n L e n   >   1   T h e n 
 
             C a l l   B _ E n u m N e t P r i n t e r ( p b u f ) 
 
         E n d   I f 
 
 
 
 f  iQPQxe/f ND}vQxe0HQ(u  B _ G e t N e t P r i n t e r B u f f e r L e n ( )   S_  N e t   P r i n t e r 
 
         vǌew^,   6q_QMaԚf}  B _ E n u m N e t P r i n t e r ( )   2QX[  N e t   P r i n t e r   vǌe0
 
         N e t   P r i n t e r   vǌe/fN( " 0 x 0 d 0 x 0 a " ) ZPR, 	OO,   Ygǌe/f  
 
         N e t P r i n t e r : 1 9 2 . 1 6 8 . 1 . 2 ( 0 x 0 d ) ( 0 x 0 a ) N e t P r i n t e r : 1 9 2 . 1 6 8 . 1 . 2 5   vqh:y  
 
         N e t P r i n t e r 1   /fc  N e t P r i n t e r : 1 9 2 . 1 6 8 . 1 . 2 ,   
 
         N e t P r i n t e r 2   /fc  N e t P r i n t e r : 1 9 2 . 1 6 8 . 1 . 2 5 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ C r e a t e P r n ( ) 
 
   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R  _U  P r i n t e r   ]\O0
 
 
 
 l
 
     V C : 
 
         i n t   B _ C r e a t e P r n ( i n t   s e l e c t i o n ,   L P C T S T R   f i l e n a m e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ C r e a t e P r n ( B y V a l   s e l e c t i o n   A s   L o n g ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   L o n g 
 
     V B : 
 
         D e c l a r e   F u n c t i o n   B _ C r e a t e P r n ( B y V a l   s e l e c t i o n   A s   I n t e g e r ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         s e l e c t i o n ; 
 
             xd8QWbjHh0
 
             0   - >   p r i n t   t o   f i l e . 
 
             1   - >   l p t 1 ,   2   - >   l p t 2 ,   3   - >   l p t 3 
 
             4   - >   c o m 1 ,   5   - >   c o m 2 ,   6   - >   c o m 3 
 
             1 0   - >   p i p e ,   1 1   - >   U S B X X X ,   1 2   - >   U S B 
 
             1 3   - >   L A N   C l i e n t ( T C P / I P ) 
 
         f i l e n a m e ; 
 
             vu  s e l e c t i o n   /f  0   BfǌeGR8QjHhf i l e n a m e   pjHh
T1zS+T_0
 
             vu  s e l e c t i o n   /f  1 0   Bff i l e n a m e   p8Q_b_jx( ݈n_) 0
 
             vu  s e l e c t i o n   /f  1 1   Bff i l e n a m e   cv/f`_UvU S B KNi n d e x ,   i n d e x 1u1 Y; 
 
             vu  s e l e c t i o n   /f  1 2   Bff i l e n a m e   cv/f`_UvU S B _jx( ݈n_) ,   
 
             Tn P o r t   =   1 0 vO(uel N#j
 
             vu  s e l e c t i o n   gQ[/f  1 3   Bf,   f i l e n a m e   cv/f`_UvI P   A d d r e s s ,   O(uT C P / I P S_U;   
 
             -vp o r t <Pp9 1 0 0 ,   傁c[p o r t <P,   Y8 0 ,   GR(WI P A d d r e s s _R
NW[2N" : 8 0 " . 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ C r e a t e P r n ( 1 ,   N U L L ) ;   o r   B _ C r e a t e P r n ( 0 ,   " C : \ \ o u t . p r n " ) ; 
 
         B _ C r e a t e P r n ( 1 0 , " \ \ \ \ a l l e n \ \ L a b e l " ) ;     / / s h a r e   m o d e . 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ C r e a t e P r n ( 1 ,   n u l l )   o r   C a l l   B _ C r e a t e P r n ( 0 ,   " C : \ \ o u t . p r n " ) 
 
         C a l l   B _ C r e a t e P r n ( 1 0 ,   " \ \ \ \ a l l e n \ \ L a b e l " ) 
 
 
 
 f  B _ C r e a t e P r n ( )   Qxeg_U`Oxdv8QWb_U`OueQv8Qj0
 
         PQxe_(W@b	gQxeKNMRWL0
 
         B _ C r e a t e P r n ( ) ,   B _ C r e a t e U S B P o r t ( )   ,   B _ C r e a t e N e t P o r t ( )   T  B _ C r e a t e P o r t ( )   
NTBfO(u0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ C r e a t e P o r t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R  _U  P r i n t e r   ]\O0
 
 
 
 l
 
     V C : 
 
         i n t   B _ C r e a t e P o r t ( i n t   n P o r t T y p e ,   i n t   n P o r t ,   L P C T S T R   f i l e n a m e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ C r e a t e P o r t ( B y V a l   n P o r t T y p e   A s   L o n g ,   B y V a l   n P o r t   A s   L o n g ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ C r e a t e P o r t ( B y V a l   n P o r t T y p e   A s   I n t e g e r ,   B y V a l   n P o r t   A s   I n t e g e r ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n P o r t T y p e ; 
 
             xd8QW.z^0
 
             0   - >   jHh
 
             1   - >   S e r i a l   p o r t 
 
             2   - >   P a r a l l e l   p r o t 
 
             4   - >   U S B   p o r t 
 
             5   - >   L A N   p o r t 
 
             6   - >   U S B   p o r t 
 
         n P o r t ; 
 
             xd8QW}_0
 
             vu  n P o r t T y p e   p  1   Bf,   1   - >   c o m 1 ,   2   - >   c o m 2 , . . . . . 
 
         f i l e n a m e ; 
 
             vu  n P o r t T y p e   p  0   BfǌeGR8QjHhf i l e n a m e   pjHh
T1zS+T_0
 
             vu  n P o r t T y p e   p  4   Bff i l e n a m e   cv/f`_UvU S B vi n d e x ,   i n d e x 1u1 Y. 
 
             vu  n P o r t T y p e   p  5   Bff i l e n a m e   cv/f`_UvI P   A d d r e s s ,   O(uT C P / I P ,   
 
             p o r t   9 1 0 0 S_U. 
 
             vu  n P o r t T y p e   p  6   Bff i l e n a m e   cv/f`_UvU S B v݈n_. 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ C r e a t e P o r t ( 1 ,   1 ,   N U L L ) 
 
         B _ C r e a t e P o r t ( 0 ,   0 ,   " C : \ \ o u t . p r n " ) ; 
 
         B _ C r e a t e P o r t ( 5 ,   0 ,   " 1 9 2 . 1 6 8 . 1 . 3 " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ C r e a t e P o r t ( 1 ,   1 ,   n u l l ) 
 
         C a l l   B _ C r e a t e P o r t ( 0 ,   0 ,   " C : \ \ o u t . p r n " ) 
 
         C a l l   B _ C r e a t e P o r t ( 5 ,   0 ,   " 1 9 2 . 1 6 8 . 1 . 3 " ) 
 
 
 
 f    B _ C r e a t e P o r t ( )   Qxeg_U`Oxdv8QWb_U`OueQv8Qj0
 
         PQxe_(W@b	gQxeKNMRWL0
 
         B _ C r e a t e P r n ( ) ,   B _ C r e a t e U S B P o r t ( ) ,   B _ C r e a t e N e t P o r t ( )   T  B _ C r e a t e P o r t ( )   
NTBfO(u0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ C r e a t e U S B P o r t ( ) 
 
 B _ C r e a t e N e t P o r t ( ) 
 
   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R  _U  P r i n t e r   ]\O0
 
               O(u  B _ C r e a t e U S B P o r t ( )   MR HQ|TS  B _ G e t U S B B u f f e r L e n ( ) ,   
 
               /fpNT  B _ E n u m U S B ( )   S  B _ G e t U S B D e v i c e I n f o ( )   Tek0
 
               O(u  B _ C r e a t e N e t P o r t ( )   MR HQ|TS  B _ G e t N e t P r i n t e r B u f f e r L e n ( ) ,   
 
               /fpNT  B _ E n u m N e t P r i n t e r ( )   Tek0
 
 
 
 l
 
     V C : 
 
         i n t   B _ C r e a t e U S B P o r t ( i n t   n P o r t ) ; 
 
         i n t   B _ C r e a t e N e t P o r t ( i n t   n P o r t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ C r e a t e U S B P o r t ( B y V a l   n P o r t   A s   L o n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   B _ C r e a t e N e t P o r t ( B y V a l   n P o r t   A s   L o n g )   A s   L o n g 
 
     V B : 
 
         D e c l a r e   F u n c t i o n   B _ C r e a t e U S B P o r t ( B y V a l   n P o r t   A s   I n t e g e r )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   B _ C r e a t e N e t P o r t ( B y V a l   n P o r t   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n P o r t ; 
 
             U S B   P8W  ;   L A N   P8W,   n P o r t 1u1 Y. 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         i n t   n L e n ; 
 
         n L e n   =   B _ G e t U S B B u f f e r L e n ( ) ; 
 
         i f   ( n L e n )   { 
 
             B _ C r e a t e U S B P o r t ( 1 ) ; 
 
         } 
 
         n L e n   =   B _ G e t N e t P r i n t e r B u f f e r L e n ( ) ; 
 
         i f   ( n L e n )   { 
 
             B _ C r e a t e N e t P o r t ( 1 ) ; 
 
         } 
 
     V B :   V B A :   V B . n e t : 
 
         D i m   n L e n   A s   L o n g 
 
         n L e n   =   B _ G e t U S B B u f f e r L e n ( ) 
 
         I f   n L e n   T h e n 
 
             C a l l   B _ C r e a t e U S B P o r t ( 1 ) 
 
         E n d   I f 
 
         n L e n   =   B _ G e t N e t P r i n t e r B u f f e r L e n ( ) 
 
         I f   n L e n   T h e n 
 
             C a l l   B _ C r e a t e N e t P o r t ( 1 ) 
 
         E n d   I f 
 
 
 
 f  B _ C r e a t e U S B P o r t ( )   T  B _ C r e a t e N e t P o r t ( ) Qxeg_U`Oxdv8QWb
 
         _U`OueQv8Qj0PQxe_(W@b	gQxeKNMRWL0
 
         B _ C r e a t e P r n ( ) ,   B _ C r e a t e U S B P o r t ( )   ,   B _ C r e a t e N e t P o r t ( )   T  B _ C r e a t e P o r t ( )   
NTBfO(u0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ C l o s e P r n ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    ܕ  P r i n t e r   ]\O0
 
 
 
 l
 
     V C : 
 
         v o i d   B _ C l o s e P r n ( v o i d ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         D e c l a r e   S u b   B _ C l o s e P r n ( ) 
 
 
 
 {O
 
     V C : 
 
         B _ C l o s e P r n ( ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ C l o s e P r n ( ) 
 
     
 
 f    P  B _ C l o s e P r n   QxegܕWLNvaԚS`Oxdv8QWbܕ`O_Uv
 
         8Qj0PQxe_(W@b	gQxeKN_WL0
 
     
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ B a r 2 d _ M a x i ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NP  M a x i   C o d e   2 D   B a r c o d e 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ B a r 2 d _ M a x i ( i n t   x ,   i n t   y ,   i n t   c l ,   i n t   c c ,   i n t   p c ,   L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ B a r 2 d _ M a x i ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   B y V a l   c l   A s   L o n g ,   _ 
 
             B y V a l   c c   A s   L o n g ,   B y V a l   p c   A s   L o n g ,   B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ B a r 2 d _ M a x i ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   c l   A s   I n t e g e r ,   B y V a l   c c   A s   I n t e g e r ,   B y V a l   p c   A s   I n t e g e r ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         c l ; 
 
             A   3 - MOxe  C l a s s   c o d e 0
 
         c c ; 
 
             A   3 - MOxe  C o u n t r y   c o d e 0
 
         p c ; 
 
             (WW  P o s t   c o d e   /f NP4 b5 - MOxevQNW[/f  6   MOxe0
 
         d a t a ; 
 
             ǌeW[2N gY8 4 PW[CQ0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ B a r 2 d _ M a x i ( 5 0 ,   5 0 ,   3 0 0 ,   4 0 0 ,   9 3 0 6 5 ,   " T h i s   M a x i C o d e " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ B a r 2 d _ M a x i ( 5 0 ,   5 0 ,   3 0 0 ,   4 0 0 ,   9 3 0 6 5 ,   " T h i s   M a x i C o d e " ) 
 
 
 
 f    P  B _ B a r 2 d _ M a x i   QxeSNRpSQ NP  M a x i   C o d e   2 D   B a r c o d e 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ B a r 2 d _ P D F 4 1 7 ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NP  P D F - 4 1 7   2 D   B a r c o d e 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ B a r 2 d _ P D F 4 1 7 ( i n t   x ,   i n t   y ,   i n t   w ,   i n t   v ,   i n t   s ,   i n t   c ,   i n t   p x ,   i n t   p y ,   
 
             i n t   r ,   i n t   l ,   i n t   t ,   i n t   o ,   L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ B a r 2 d _ P D F 4 1 7 ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   B y V a l   w   A s   L o n g ,   _ 
 
             B y V a l   v   A s   L o n g ,   B y V a l   s   A s   L o n g ,   B y V a l   c   A s   L o n g ,   B y V a l   p x   A s   L o n g ,   _ 
 
             B y V a l   p y   A s   L o n g ,   B y V a l   r   A s   L o n g ,   B y V a l   l   A s   L o n g ,   B y V a l   t   A s   L o n g ,   _ 
 
             B y V a l   o   A s   L o n g ,   B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ B a r 2 d _ P D F 4 1 7 ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   w   A s   I n t e g e r ,   B y V a l   v   A s   I n t e g e r ,   B y V a l   s   A s   I n t e g e r ,   B y V a l   c   A s   I n t e g e r ,   _ 
 
             B y V a l   p x   A s   I n t e g e r ,   B y V a l   p y   A s   I n t e g e r ,   B y V a l   r   A s   I n t e g e r ,   B y V a l   l   A s   I n t e g e r ,   _ 
 
             B y V a l   t   A s   I n t e g e r ,   B y V a l   o   A s   I n t e g e r ,   B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0( 1   d o t   =   0 . 1 2 5   m m ) 
 
         w ; 
 
              g'YRpS[^UMO  d o t s 0
 
         v ; 
 
              g'YRpSؚ^UMO  d o t s 0
 
         s ; 
 
             /!hckI{}{
W0 ^8 0
 
         c ; 
 
             ǌeX.~I{}{
W0   b  1 0
 
         p x ; 
 
             !jD}[^{
W2 ^9   d o t s 0
 
         p y ; 
 
             !jD}ؚ^{
W4 ^9 9   d o t s 0
 
         r ; 
 
              g'Y  r o w   c o u n t 0
 
         l ; 
 
              g'Y  c o l u m n   c o u n t 0
 
         t ; 
 
             T r u n c a t i o n   f l a g ' 0 '   /f  n o r m a l   T  ' 1 '   /f  t r u n c a t e d . 
 
         o ; 
 
             RpSeT[MO' 0 ' /f  0  ' 1 ' /f9 0  0' 2 ' /f1 8 0  ' 3 ' /f2 7 0  
 
         d a t a ; 
 
             ǌeW[2N0
 
 
 
 PV<P
 
         0         - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ B a r 2 d _ P D F 4 1 7 ( 1 0 ,   1 0 ,   4 0 0 ,   3 0 0 ,   0 ,   0 ,   3 ,   7 ,   1 0 ,   2 ,   0 ,   0 ,   " A R G O X I N F O " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ B a r 2 d _ P D F 4 1 7 ( 1 0 ,   1 0 ,   4 0 0 ,   3 0 0 ,   0 ,   0 ,   3 ,   7 ,   1 0 ,   2 ,   0 ,   0 ,   " A R G O X I N F O " ) 
 
 
 
 f    P  B _ B a r 2 d _ P D F 4 1 7   QxeSNRpSQ NP  P D F - 4 1 7   2 D   B a r c o d e 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ B a r 2 d _ D a t a M a t r i x ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NP  D a t a   M a t r i x   c o d e 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ B a r 2 d _ D a t a M a t r i x ( i n t   x ,   i n t   y ,   i n t   r ,   i n t   l ,   i n t   h ,   i n t   v ,   L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ B a r 2 d _ D a t a M a t r i x ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   B y V a l   r   A s   L o n g ,   _ 
 
             B y V a l   l   A s   L o n g ,   B y V a l   h   A s   L o n g ,   B y V a l   v   A s   L o n g ,   B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ B a r 2 d _ D a t a M a t r i x ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   r   A s   I n t e g e r ,   B y V a l   l   A s   I n t e g e r ,   B y V a l   h   A s   I n t e g e r ,   _ 
 
             B y V a l   v   A s   I n t e g e r ,   B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         r ; 
 
             r o w   c o u n t ( {
W9 ^4 9 ,   _pvPxe<P;   0 pR) 0
 
         l ; 
 
             c o l u m n   c o u n t ( {
W9 ^4 9 ,   _pvPxe<P;   0 pR) 0
 
         h ; 
 
             !jD}ؚ^{
W1 ^4 0   d o t s 0
 
         v ; 
 
             SIhxvq_P00   - >   F A L S E 01   - >   T R U E 0
 
         d a t a ; 
 
             ǌeW[2N0
 
 
 
 PV<P
 
         0         - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ B a r 2 d _ D a t a M a t r i x ( 1 0 ,   1 0 ,   0 ,   0 ,   5 ,   0 ,   " D a t a M a t r i x " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ B a r 2 d _ D a t a M a t r i x ( 1 0 ,   1 0 ,   0 ,   0 ,   5 ,   0 ,   " D a t a M a t r i x " ) 
 
 
 
 f    P  B _ B a r 2 d _ D a t a M a t r i x   QxeSNRpSQ NP  D a t a   M a t r i x   c o d e 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ D e l _ F o r m ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    *Rd  F o r m   ( h<h) 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ D e l _ F o r m ( c h a r   f o r m n a m e [ 1 0 ] ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ D e l _ F o r m ( B y V a l   f o r m n a m e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ D e l _ F o r m ( B y V a l   f o r m n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         f o r m n a m e ; 
 
             h<h
T1z gY  9   PW[0
 
             vu  f o r m n a m e   gQ[/f  ' * ' Bf\gndpSh_jgQ@b	gh<h0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ D e l _ F o r m ( " d e m o " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ D e l _ F o r m ( " d e m o " ) 
 
 
 
 f    P  B _ D e l _ F o r m   Qxeg*RdpSh_jgQ`O8eQv  F o r m   ( h<h) 
T1z0vu
 
         `O*Rd[_\
NQSFOSN͑e	eQ0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ D e l _ P c x ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    *Rd2QX[eR A M bF l a s h -NvWb_0
 
 
 
 l
 
     V C : 
 
         i n t   B _ D e l _ P c x ( c h a r   p c x n a m e [ 1 0 ] ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ D e l _ P c x ( B y V a l   p c x n a m e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ D e l _ P c x ( B y V a l   p c x n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         p c x n a m e ; 
 
             Wb_
T1z gY  9   PW[0
 
             vu  p c x n a m e   gQ[/f  ' * ' Bf\gndpSh_jgQ  R A M   b  f l a s h   m e m o r y   @b	gWb_0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ D e l _ P c x ( " * " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ D e l _ P c x ( " * " ) 
 
 
 
 f    P  B _ D e l _ P c x   Qxeg*RdpSh_jgQ`O8eQvWb_
T1z0vu`O*Rd[_
 
         \
NQSFOSN͑e	eQ0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ D r a w _ B o x ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    ku NPFh0
 
 
 
 l
 
     V C : 
 
         i n t   B _ D r a w _ B o x ( i n t   x ,   i n t   y ,   i n t   t h i c k n e s s ,   i n t   h o r _ d o t s ,   i n t   v e r _ d o t s ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ D r a w _ B o x ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   t h i c k n e s s   A s   L o n g ,   B y V a l   h o r _ d o t s   A s   L o n g ,   B y V a l   v e r _ d o t s   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ D r a w _ B o x ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   t h i c k n e s s   A s   I n t e g e r ,   B y V a l   h o r _ d o t s   A s   I n t e g e r ,   _ 
 
             B y V a l   v e r _ d o t s   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             wޞ  X   ^j0
 
         y ; 
 
             wޞ  Y   ^j0( 1   d o t   =   0 . 1 2 5   m m ) 
 
         t h i c k n e s s ; 
 
             c[FhV}S^0
 
         h o r _ d o t s ;   
 
             
\҉ޞ  X   ^j0
 
         v e r _ d o t s ; 
 
             
\҉ޞ  Y   ^j0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ D r a w _ B o x ( 5 0 ,   1 2 0 ,   5 ,   2 5 0 ,   1 5 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ D r a w _ B o x ( 5 0 ,   1 2 0 ,   5 ,   2 5 0 ,   1 5 0 ) 
 
 
 
 f    P  B _ D r a w _ B o x   Qxegku NPl\'`/f  " O R "   vFh0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ D r a w _ L i n e ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    ku Nh}0
 
 
 
 l
 
     V C : 
 
         i n t   B _ D r a w _ L i n e ( c h a r   m o d e ,   i n t   x ,   i n t   y ,   i n t   h o r _ d o t s ,   i n t   v e r _ d o t s ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ D r a w _ L i n e ( B y V a l   m o d e   A s   B y t e ,   B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   h o r _ d o t s   A s   L o n g ,   B y V a l   v e r _ d o t s   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ D r a w _ L i n e ( B y V a l   m o d e   A s   B y t e ,   B y V a l   x   A s   I n t e g e r ,   _ 
 
             B y V a l   y   A s   I n t e g e r ,   B y V a l   h o r _ d o t s   A s   I n t e g e r ,   B y V a l   v e r _ d o t s   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         m o d e ; 
 
             xd}h.z^YNh
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   m o d e   |   }h.z^.                                     | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |       E     |   E x c l u s i v e   O R                               | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |       O     |   O R                                                   | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |       W     |   }v}[g˄cHQMRq_P          | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
         x ; 
 
             wޞ  X   ^j0
 
         y ; 
 
             wޞ  Y   ^j0( 1   d o t   =   0 . 1 2 5   m m ) 
 
         w i d t h ; 
 
             4ls^w^0
 
         h e i g h t ; 
 
             Wvw^0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ D r a w _ L i n e ( ' O ' ,   5 0 ,   3 0 ,   1 0 0 ,   1 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ D r a w _ L i n e ( A s c ( " O " ) ,   5 0 ,   3 0 ,   1 0 0 ,   1 0 ) 
 
 
 
 f    P  D r a w _ L i n e   Qxegku NPl\'`/f" O R " b" X O R " v}hS Nh}v}0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ E r r o r _ R e p o r t i n g ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    _Ubܕ/VPR0
 
 
 
 l
 
     V C : 
 
         i n t   B _ E r r o r _ R e p o r t i n g ( c h a r   o p t i o n ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ E r r o r _ R e p o r t i n g ( B y V a l   o p t i o n s   A s   B y t e )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ E r r o r _ R e p o r t i n g ( B y V a l   o p t i o n s   A s   B y t e )   A s   I n t e g e r 
 
 
 
 Sxe
 
         o p t i o n ; 
 
             vu  o p t i o n   /f' N ' Bf  D i s a b l e   rKaVK0
 
             ' S '   /f  E n a b l e   rKaVK0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ E r r o r _ R e p o r t i n g ( ' S ' ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ E r r o r _ R e p o r t i n g ( A s c ( " S " ) ) 
 
 
 
 f    P  B _ E r r o r _ R e p o r t i n g   QxegOpSh_jrKaVK  D i s a b l e / E n a b l e V
 
         KS/fN  R S 2 3 2   P o r t 0[<P/f  D i s a b l e 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ G e t _ D L L _ V e r s i o n ( ) 
 
 B _ G e t _ D L L _ V e r s i o n A ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    S_byQdkQxe^Hr,gǌ
0
 
 
 
 l
 
     V C : 
 
         c h a r *   B _ G e t _ D L L _ V e r s i o n ( i n t   n S h o w M e s s a g e ) ; 
 
         i n t   B _ G e t _ D L L _ V e r s i o n A ( i n t   n S h o w M e s s a g e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ G e t _ D L L _ V e r s i o n ( B y V a l   n S h o w M e s s a g e   A s   L o n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   B _ G e t _ D L L _ V e r s i o n A ( B y V a l   n S h o w M e s s a g e   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ G e t _ D L L _ V e r s i o n ( B y V a l   n S h o w M e s s a g e   A s   I n t e g e r )   A s   S t r i n g 
 
         D e c l a r e   F u n c t i o n   B _ G e t _ D L L _ V e r s i o n A ( B y V a l   n S h o w M e s s a g e   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n S h o w M e s s a g e ; 
 
             0   - >   
o`z
Nos0
 
             1   - >   
o`zos0
 
 
 
 PV<P
 
         B _ G e t _ D L L _ V e r s i o n ( ) ;     PVHr,gǌ
W[2N1YWeGRPV  N U L L 0
 
         B _ G e t _ D L L _ V e r s i o n A ( ) ;     r e t u r n   v e r s i o n   v a l u e . 
 
                                                       ;NHr_  =   ( r e t u r n   v e r s i o n   v a l u e )   /   1 0 0 . 
 
                                                       P[Hr_  =   ( r e t u r n   v e r s i o n   v a l u e )   %   1 0 0 . 
 
 
 
 {O
 
     V C : 
 
         i n t   n V e r s i o n ,   n M a i n V e r s i o n ,   n S u b V e r s i o n ; 
 
         n V e r s i o n   =   B _ G e t _ D L L _ V e r s i o n A ( 1 ) ; 
 
         n M a i n V e r s i o n   =   n V e r s i o n   /   1 0 0 ; 
 
         n S u b V e r s i o n   =   n V e r s i o n   %   1 0 0 ; 
 
     V B :   V B A : 
 
         D i m   n V e r s i o n ,   n M a i n V e r s i o n ,   n S u b V e r s i o n   A s   L o n g 
 
         n V e r s i o n   =   B _ G e t _ D L L _ V e r s i o n A ( 1 ) 
 
         n M a i n V e r s i o n   =   I n t ( n V e r s i o n   /   1 0 0 ) 
 
         n S u b V e r s i o n   =   n V e r s i o n   M o d   1 0 0 
 
     V B . n e t : 
 
         D i m   n V e r s i o n ,   n M a i n V e r s i o n ,   n S u b V e r s i o n   A s   I n t e g e r 
 
         n V e r s i o n   =   B _ G e t _ D L L _ V e r s i o n A ( 1 ) 
 
         n M a i n V e r s i o n   =   n V e r s i o n   /   1 0 0 
 
         n S u b V e r s i o n   =   n V e r s i o n   M o d   1 0 0 
 
 
 
 f    P  B _ G e t _ D L L _ V e r s i o n   QxeO(uS_byQdkQxe^Hr,gǌ
0
 
         1ue  B _ G e t _ D L L _ V e r s i o n ( )   /fVPW[2N,   (W  V B   T  V B A   v|v
N,    O(u  
 
         R t l M o v e M e m o r y ( )   SIc6q_MbS_,   dkQ_(WO(u
N	gbS
Nv㖦^,   
 
         Vdk  V B   T  V B A   v|v^p
NO(udkQ_,   ˊ9e(u  B _ G e t _ D L L _ V e r s i o n A ( ) ,   
 
          N[O(u  B _ G e t _ D L L _ V e r s i o n ( ) ,   ˊS  M S D N . 
 
         
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ G e t _ G r a p h i c _ C o l o r B M P ( ) 
 
 B _ G e t _ G r a p h i c _ C o l o r B M P E x ( ) 
 
 B _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    \  B M P   WjIcbpp!j_&N\Wb_2QX[(WpSh_jgQv  R A M 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ G e t _ G r a p h i c _ C o l o r B M P ( i n t   x ,   i n t   y ,   L P C T S T R   f i l e n a m e ) ; 
 
         i n t   B _ G e t _ G r a p h i c _ C o l o r B M P E x ( i n t   x ,   i n t   y ,   i n t   n W i d t h ,   i n t   n H e i g h t , 
 
             i n t   r o t a t e ,   L P C T S T R   i d _ n a m e ,   L P C T S T R   f i l e n a m e ) ; 
 
         i n t   B _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( i n t   x ,   i n t   y ,   i n t   n W i d t h ,   i n t   n H e i g h t , 
 
             i n t   r o t a t e ,   L P C T S T R   i d _ n a m e ,   H B I T M A P   h b m ) ;         
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ G e t _ G r a p h i c _ C o l o r B M P ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   B _ G e t _ G r a p h i c _ C o l o r B M P E x ( B y V a l   x   A s   L o n g ,   _ 
 
             B y V a l   y   A s   L o n g ,   B y V a l   n W i d t h   A s   L o n g ,   B y V a l   n H e i g h t   A s   L o n g ,   _ 
 
             B y V a l   r o t a t e   A s   L o n g ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   f i l e n a m e   A s   S t r i n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   B _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( B y V a l   x   A s   L o n g ,   _ 
 
             B y V a l   y   A s   L o n g ,   B y V a l   n W i d t h   A s   L o n g ,   B y V a l   n H e i g h t   A s   L o n g ,   _ 
 
             B y V a l   r o t a t e   A s   L o n g ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   h b m   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ G e t _ G r a p h i c _ C o l o r B M P ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   B _ G e t _ G r a p h i c _ C o l o r B M P E x ( B y V a l   x   A s   I n t e g e r ,   _ 
 
             B y V a l   y   A s   I n t e g e r ,   B y V a l   n W i d t h   A s   I n t e g e r ,   B y V a l   n H e i g h t   A s   I n t e g e r ,   _ 
 
             B y V a l   r o t a t e   A s   I n t e g e r ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   f i l e n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   B _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( B y V a l   x   A s   I n t e g e r ,   _ 
 
             B y V a l   y   A s   I n t e g e r ,   B y V a l   n W i d t h   A s   I n t e g e r ,   B y V a l   n H e i g h t   A s   I n t e g e r ,   _ 
 
             B y V a l   r o t a t e   A s   I n t e g e r ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   h b m   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         n W i d t h ; 
 
             dkSxeh:ySW.~>e_vWb_[^0 h:yO(uSW[^0
 
         n H e i g h t ; 
 
             dkSxeh:ySW.~>e_vWb_ؚ^0 h:yO(uSWؚ^0
 
         r o t a t e ; 
 
             dkSxeh:yWb_.~>e_eIveT' 0 ' /f  0  ' 1 ' /f9 0  0' 2 ' /f1 8 0  ' 3 ' /f2 7 0  0
 
         i d _ n a m e ; 
 
             f}N NPX%R
T1zX[>eepSh_jgQN_vcO(u  B _ L o a d _ P c x ( )   sSS\
W|TSQO0
 
         f i l e n a m e ; 
 
             Wb_j
T1zSS+T_0
 
             <h_YX X X X X X X X . X X X   b  X : \ \ X X X \ \ X X X . X X X 
 
         h b m ; 
 
             G D I   v  H B I T M A P   H A N D L E ,   S/ec  I M A G E _ B I T M A P   <h_0
 
         
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ G e t _ G r a p h i c _ C o l o r B M P ( 3 0 ,   2 0 ,   " b b . b m p " ) ; 
 
         B _ G e t _ G r a p h i c _ C o l o r B M P E x ( 3 0 ,   2 0 ,   2 0 0 ,   1 5 0 ,   2 ,   " b b 1 " ,   " b b . b m p " ) ; / / 1 8 0   a n g l e . 
 
         H A N D L E   h i m a g e   =   L o a d I m a g e ( N U L L , " b b . b m p " , I M A G E _ B I T M A P , 0 , 0 , L R _ L O A D F R O M F I L E ) ; 
 
         B _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( 3 0 ,   2 0 ,   2 5 0 ,   8 0 ,   1 ,   " b b 2 " ,   ( H B I T M A P ) h i m a g e ) ; / / 9 0   a n g l e .             
 
     V B :   V B A : 
 
         C o n s t   I M A G E _ B I T M A P   =   0 
 
         C o n s t   L R _ L O A D F R O M F I L E   =   & H 1 0 
 
         P r i v a t e   D e c l a r e   F u n c t i o n   L o a d I m a g e   L i b   " u s e r 3 2 "   A l i a s   " L o a d I m a g e A "   ( B y V a l   h I n s t   A s   L o n g ,   _ 
 
                         B y V a l   l p s z   A s   S t r i n g ,   B y V a l   u n 1   A s   L o n g ,   B y V a l   n 1   A s   L o n g ,   B y V a l   n 2   A s   L o n g ,   _ 
 
                         B y V a l   u n 2   A s   L o n g )   A s   L o n g 
 
         P r i v a t e   D e c l a r e   F u n c t i o n   D e l e t e O b j e c t   L i b   " G d i 3 2 "   ( B y V a l   h o   A s   L o n g )   A s   L o n g 
 
         
 
         C a l l   B _ G e t _ G r a p h i c _ C o l o r B M P ( 3 0 ,   2 0 ,   " b b . b m p " ) 
 
         C a l l   B _ G e t _ G r a p h i c _ C o l o r B M P E x ( 3 0 ,   2 0 ,   2 0 0 ,   1 5 0 ,   2 ,   " b b 1 " ,   " b b . b m p " )   '   1 8 0   a n g l e . 
 
         D i m   h i m a g e   A s   L o n g 
 
         h i m a g e   =   L o a d I m a g e ( 0 ,   " b b . b m p " ,   I M A G E _ B I T M A P ,   0 ,   0 ,   L R _ L O A D F R O M F I L E ) 
 
         C a l l   B _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( 3 0 ,   2 0 ,   2 5 0 ,   8 0 ,   1 ,   " b b 2 " ,   h i m a g e )   '   9 0   a n g l e . 
 
         I f   h i m a g e   T h e n 
 
                 C a l l   D e l e t e O b j e c t ( h i m a g e ) 
 
         E n d   I f 
 
     V B . n e t : 
 
         C o n s t   I M A G E _ B I T M A P   =   0 
 
         C o n s t   L R _ L O A D F R O M F I L E   =   & H 1 0 
 
         P r i v a t e   D e c l a r e   F u n c t i o n   L o a d I m a g e   L i b   " u s e r 3 2 "   A l i a s   " L o a d I m a g e A "   ( B y V a l   h I n s t   A s   I n t e g e r ,   _ 
 
                         B y V a l   l p s z   A s   S t r i n g ,   B y V a l   u n 1   A s   I n t e g e r ,   B y V a l   n 1   A s   I n t e g e r ,   B y V a l   n 2   A s   I n t e g e r ,   _ 
 
                         B y V a l   u n 2   A s   I n t e g e r )   A s   I n t e g e r 
 
     
 
         C a l l   B _ G e t _ G r a p h i c _ C o l o r B M P ( 3 0 ,   2 0 ,   " b b . b m p " ) 
 
         C a l l   B _ G e t _ G r a p h i c _ C o l o r B M P E x ( 3 0 ,   2 0 ,   2 0 0 ,   1 5 0 ,   2 ,   " b b 1 " ,   " b b . b m p " )   '   1 8 0   a n g l e . 
 
         D i m   h i m a g e   A s   I n t e g e r 
 
         h i m a g e   =   L o a d I m a g e ( 0 ,   " b b . b m p " ,   I M A G E _ B I T M A P ,   0 ,   0 ,   L R _ L O A D F R O M F I L E ) 
 
         C a l l   B _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( 3 0 ,   2 0 ,   2 5 0 ,   8 0 ,   1 ,   " b b 2 " ,   h i m a g e )   '   9 0   a n g l e .   
 
 
 
 f    P  B _ G e t _ G r a p h i c _ C o l o r B M P ( )   QxeS8eQNUOMOCQxev  B M P   Wj&NRIc
 
         pў}vppWjpSh_jRpS0
 
         B _ G e t _ G r a p h i c _ C o l o r B M P E x ( )   T  B _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( )   Q_SZP>e'Y
 
         .~\SeIvRR%RS)R(uj
TS  G D I   v  H B I T M A P   H A N D L E   vuǌeOn0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ G e t _ P c x ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    RpS NPWb_&N\Wb_2QX[(WpSh_jgQv  M e m o r y 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ G e t _ P c x ( i n t   x ,   i n t   y ,   L P C T S T R   f i l e n a m e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ G e t _ P c x ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ G e t _ P c x ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0( 1   d o t   =   0 . 1 2 5   m m ) 
 
         f i l e n a m e ; 
 
             Wb_j
T1zS+T_0
 
             <h_YX X X X X X X X . X X X   b  X : \ \ X X X \ \ X X X . X X X 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ G e t _ P c x ( 1 0 , 1 0 0 , " p h o n e . p c x " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ G e t _ P c x ( 5 0 ,   3 0 ,   " p h o n e . p c x " ) 
 
 
 
 f    P  B _ G e t _ P c x   QxegRpS NPWb_&N\Wb_2QX[(WpSh_jgQv  R A M   b
 
         f l a s h   m e m o r y 0Wb_j_/f  P C X   v<h_0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ I n i t i a l _ S e t t i n g ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    MRnUt0
 
 
 
 l
 
     V C : 
 
         i n t   B _ I n i t i a l _ S e t t i n g ( i n t   T y p e ,   L P C T S T R   S o u r c e ) ; 
 
     V B : 
 
         D e c l a r e   F u n c t i o n   B _ I n i t i a l _ S e t t i n g ( B y V a l   T y p e   A s   L o n g ,   _ 
 
             B y V a l   S o u r c e   A s   S t r i n g )   A s   L o n g 
 
     V B : 
 
         D e c l a r e   F u n c t i o n   B _ I n i t i a l _ S e t t i n g ( B y V a l   T y p e   A s   I n t e g e r ,   _ 
 
             B y V a l   S o u r c e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         T y p e ; 
 
             xd8eQ!j_0
 
             0   - >   8eQW[2N1   - >   8eQjHh0
 
         S o u r c e ; 
 
             ǌeOnSpW[2NbjHh
T1zS+T_0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         L P C T S T R   a a   =   " Z T \ r \ n " ; 
 
         B _ I n i t i a l _ S e t t i n g ( 0 ,   a a ) ; 
 
             o r 
 
         B _ I n i t i a l _ S e t t i n g ( 1 ,   " i n i t f i l e . t x t " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         D i m   a a   A s   S t r i n g 
 
         a a   =   " Z T "   +   C h r ( 1 3 )   +   C h r ( 1 0 ) 
 
         C a l l   B _ I n i t i a l _ S e t t i n g ( 0 ,   a a ) 
 
             o r 
 
         C a l l   B _ I n i t i a l _ S e t t i n g ( 1 ,   " i n i t f i l e . t x t " ) 
 
 
 
 f    P  B _ I n i t i a l _ S e t t i n g   QxeMRnUtvR\O/f\ N2N  C o m m a n d   HQpSh
 
         _j1uW[2NbjHh8eQ(WO(uPQxeBfHQ(W  B _ C r e a t e _ P r n ( )   KN_vQN
 
         QxeKNMRS\OpO(uWKa0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ W r i t e D a t a ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    (uOzsS\ǌePQbfBf[eQfX[@S-N0
 
 
 
 l
 
     V C : 
 
         i n t   B _ W r i t e D a t a ( i n t   I s I m m e d i a t e ,   L P C T S T R   p b u f ,   D W O R D   l e n g t h ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ W r i t e D a t a ( B y V a l   I s I m m e d i a t e   A s   L o n g ,   _ 
 
             B y V a l   p b u f   A s   S t r i n g ,   B y V a l   l e n g t h   A s   L o n g )   A s   L o n g     
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ W r i t e D a t a ( B y V a l   I s I m m e d i a t e   A s   I n t e g e r ,   _ 
 
             B y V a l   p b u f   A s   B y t e ( ) ,   B y V a l   l e n g t h   A s   U L o n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         I s I m m e d i a t e ; 
 
             1 pzsSP,   SPp b u f -NvgQ[8QW;   
 
             0 p\ǌeR0RfX[@S_,   I{|TSB _ P r i n t _ O u t ( ) BfMbP0
 
         p b u f ; 
 
             Pvǌecj0
 
         l e n g t h ; 
 
             p b u f vǌew^0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         c o n s t   c h a r   s z n o p 1 [ ]   =   " n o p _ f r o n t \ r \ n " ; 
 
         c o n s t   c h a r   s z n o p 2 [ ]   =   " n o p _ m i d d l e \ r \ n " ; 
 
         B _ W r i t e D a t a ( 0 ,   s z n o p 2 ,   ( D W O R D ) s t r l e n ( s z n o p 2 ) ) ; 
 
         B _ W r i t e D a t a ( 1 ,   s z n o p 1 ,   ( D W O R D ) s t r l e n ( s z n o p 1 ) ) ; 
 
     V B :   V B A : 
 
         D i m   s z n o p 1   A s   S t r i n g   =   " n o p _ f r o n t "   +   v b C r L f 
 
         D i m   s z n o p 2   A s   S t r i n g   =   " n o p _ m i d d l e "   +   v b C r L f 
 
         C a l l   B _ W r i t e D a t a ( 0 ,   s z n o p 2 ,   L e n ( s z n o p 2 ) ) 
 
         C a l l   B _ W r i t e D a t a ( 1 ,   s z n o p 1 ,   L e n ( s z n o p 1 ) )     
 
     V B . n e t : 
 
         D i m   e n c A s c I I   =   S y s t e m . T e x t . E n c o d i n g . A S C I I 
 
         D i m   s z n o p 1   A s   S t r i n g   =   " n o p _ f r o n t "   +   v b C r L f 
 
         D i m   s z n o p 2   A s   S t r i n g   =   " n o p _ m i d d l e "   +   v b C r L f 
 
         C a l l   B _ W r i t e D a t a ( 0 ,   e n c A s c I I . G e t B y t e s ( s z n o p 2 ) ,   s z n o p 2 . L e n g t h ) 
 
         C a l l   B _ W r i t e D a t a ( 1 ,   e n c A s c I I . G e t B y t e s ( s z n o p 1 ) ,   s z n o p 1 . L e n g t h ) 
 
 
 
 f    dkQ_(uO\O(u`
\pSh_jNTvc6RcNbNUORpSǌe,   vS)R(udk
 
         Q_O[b0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ R e a d D a t a ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    S_pSh_j-Nvǌe0
 
 
 
 l
 
     V C : 
 
         i n t   B _ R e a d D a t a ( L P T S T R   p b u f ,   D W O R D   l e n g t h ,   D W O R D   d w T i m e o u t m s ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ R e a d D a t a ( B y V a l   p b u f   A s   S t r i n g ,   B y V a l   l e n g t h   A s   L o n g ,   _ 
 
             B y V a l   d w T i m e o u t m s   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ R e a d D a t a ( B y V a l   p b u f   A s   B y t e ( ) ,   B y V a l   l e n g t h   A s   U L o n g ,   _ 
 
             B y V a l   d w T i m e o u t m s   A s   U L o n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         p b u f ; 
 
             c6eVPǌevcj0Yg[/fzzcj,   GR
NkXǌe0
 
         l e n g t h ; 
 
             Svǌe'Y\0
 
         d w T i m e o u t m s ; 
 
             xeBf,   _N1\/fSǌe gwvBf,   UMOpm s 0
 
 
 
 PV<P
 
         ]Svǌe'Y\0
 
 
 
 {O
 
     V C : 
 
         i n t   r e t ; 
 
         c h a r   t e m p [ 1 0 ] = { 0 } ; 
 
         B _ W r i t e D a t a ( 1 ,   " ^ e e \ r \ n " ,   5 ) ; / / ^ e e 
 
         r e t   =   B _ R e a d D a t a ( t e m p ,   4 ,   1 0 0 0 ) ; / / 1   s e c o n d . 
 
     V B :   V B A : 
 
         D i m   r e t   A s   I n t e g e r 
 
         D i m   t e m p   A s   S t r i n g 
 
         t e m p   =   S p a c e ( 1 0 ) 
 
         t e m p   =   " ^ e e \ r \ n " 
 
         B _ W r i t e D a t a ( 1 ,   t e m p ,   5 )       ' ^ e e 
 
         r e t   =   B _ R e a d D a t a ( p b u f ,   4 ,   1 0 0 0 )       ' 1   s e c o n d . 
 
     V B . n e t : 
 
         D i m   r e t   A s   I n t e g e r 
 
         D i m   t e m p ( 1 0 )   A s   B y t e 
 
         B _ W r i t e D a t a ( 1 ,   e n c A s c I I . G e t B y t e s ( " ^ e e \ r \ n " ) ,   5 )       ' ^ e e 
 
         r e t   =   B _ R e a d D a t a ( p b u f ,   4 ,   1 0 0 0 )       ' 1   s e c o n d . 
 
 
 
 f    dkQ_(uOSpSh_jvVPǌe,   @bNˊlaO(uv
W/f&T	gǌeVPv
 
         R0ˊTB _ W r i t e D a t a ( )   QxeMTO(u,   &NS" A r g o x   p r o g r a m m e r ' s   m a n u a l " 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ L o a d _ P c x ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    RpS NPWb_0
 
 
 
 l
 
     V C : 
 
         i n t   B _ L o a d _ P c x ( i n t   x ,   i n t   y ,   c h a r   p c x n a m e [ 1 0 ] ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ L o a d _ P c x ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   p c x n a m e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ L o a d _ P c x ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   p c x n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0P;1   d o t   =   0 . 1 2 5   m m 0
 
         p c x n a m e ; 
 
             Wb_j
T1z g'Y9 PW[CQ0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ L o a d _ P c x ( 5 0 ,   3 0 ,   " p h o n e " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ L o a d _ P c x ( 5 0 ,   3 0 ,   " p h o n e " ) 
 
 
 
 f    P  B _ L o a d _ P c x   QxegRpS NP  P C X   <h_Wb_Wb__NHQ	eQpSh
 
         _jgQv  R A M   b  f l a s h   m e m o r y   2QX[0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ O p e n _ C h i n e s e F o n t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    _UO(u-NeޞwcW[WjHh  ( 1 6 * 1 5   T  2 4 * 2 4 ) 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ O p e n _ C h i n e s e F o n t ( c h a r *   p a t h ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ O p e n _ C h i n e s e F o n t ( B y V a l   p a t h   A s   S t r i n g )   A s   L o n g 
 
     V B : 
 
         D e c l a r e   F u n c t i o n   B _ O p e n _ C h i n e s e F o n t ( B y V a l   p a t h   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         p a t h ; 
 
             -NeޞwcW[WjHhOn_0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ O p e n _ C h i n e s e F o n t ( " C : \ \ E T 3 " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ O p e n _ C h i n e s e F o n t ( " C : \ \ E T 3 " ) 
 
 
 
 f    P  B _ O p e n _ C h i n e s e F o n t   Qxe_U-NeޞwcW[WjHh  ( 1 6 * 1 5   T  2 4 * 2 4 ) 
 
         O  B _ P r n _ T e x t _ C h i n e s e   QxeO(u0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ P r i n t _ F o r m ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    RpS NP  F O R M   ( h<h) &N8eQ  F O R M   @b	gxe0xeǌe0
 
 
 
 l
 
     V C : 
 
         i n t   B _ P r i n t _ F o r m ( i n t   l a b s e t ,   i n t   c o p i e s ,   c h a r   f o r m _ o u t [ 1 0 ] ,   L P T S T R   v a r ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ P r i n t _ F o r m ( B y V a l   l a b s e t   A s   L o n g ,   B y V a l   c o p i e s   A s   L o n g ,   _ 
 
             B y V a l   f o r m _ o u t   A s   S t r i n g ,   B y V a l   v a r   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ P r i n t _ F o r m ( B y V a l   l a b s e t   A s   I n t e g e r ,   B y V a l   c o p i e s   A s   I n t e g e r ,   _ 
 
             B y V a l   f o r m _ o u t   A s   S t r i n g ,   B y V a l   v a r   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         l a b s e t ; 
 
             RpSvNxe{
W1 ^3 2 7 6 7 0
 
         c o p i e s ; 
 
             vNxe{
W1 ^3 2 7 6 7 0
 
         f o r m _ o u t ; 
 
             h<h
T1zTeKNMR	eQv  F O R M   
T1zbSHQ2QX[(WpSh_jgQv  F O R M 0
 
         v a r ; 
 
             8eQ  F O R M   @b	gxe0xeǌe(u  " , " O^R%R@S0Ygxe	g" , " _
 
             S(u" ; , " ONh_0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ P r i n t _ f o r m ( 3 ,   2 ,   " d e m o " ,   " 2 0 0 0 , B i c y c l e " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ P r i n t _ f o r m ( 3 ,   2 ,   " d e m o " ,   " 2 0 0 0 , B i c y c l e " ) 
 
 
 
 f    P  B _ P r i n t _ F o r m   Qxeg@b	gǌeSh<h0R  P r i n t e r PQxeO(uMR
 
         HQWL  B _ S e t _ F o r m ( ) &N(W@b	gQxeKN_B _ C l o s e P r n ( )   KNMRWL0vuO
 
         (udkQxeBf1\
NWL  B _ P r i n t _ O u t ( ) 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ P r i n t _ M C o p y ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    RpS@b	gǌeTR
N_R0
 
 
 
 l
 
     V C : 
 
         i n t   B _ P r i n t _ M C o p y ( i n t   l a b s e t ,   i n t   c o p i e s ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ P r i n t _ M C o p y ( B y V a l   l a b s e t   A s   L o n g ,   _ 
 
             B y V a l   c o p i e s   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ P r i n t _ M C o p y ( B y V a l   l a b s e t   A s   I n t e g e r ,   _ 
 
             B y V a l   c o p i e s   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         l a b s e t ; 
 
             RpSvNxe1   ~   3 2 7 6 7 0
 
         c o p i e s ; 
 
             vNxe1   ~   3 2 7 6 7 0
 
             vup  1   BfTI{eP r i n t _ O u t ( ) R0
 
 
 
 PV<P
 
         0 - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ P r i n t _ M C o p y ( 2 ,   2 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ P r i n t _ M C o p y ( 2 ,   2 ) 
 
 
 
 f    P  B _ P r i n t _ M C o p y   Qxeg@b	gǌe0R  P r i n t e r PQxe(W@b	gQxeKN_
 
         B _ C l o s e P r n ( )   KNMRWLvuO(udkQxeBf1\
NWL  B _ P r i n t _ O u t ( ) 0
 
         [S+T  B _ P r i n t _ O u t ( )   @b	gR0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ P r i n t _ O u t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    RpS@b	gǌe0
 
 
 
 l
 
     V C : 
 
         i n t   B _ P r i n t _ O u t ( i n t   l a b s e t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ P r i n t _ O u t ( B y V a l   l a b s e t   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ P r i n t _ O u t ( B y V a l   l a b s e t   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         l a b s e t ; 
 
             RpSvNxe0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ P r i n t _ O u t ( 1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ P r i n t _ O u t ( 1 ) 
 
 
 
 f    P  B _ P r i n t _ O u t   Qxeg@b	gǌe0R  P r i n t e r PQxe(W@b	gQxeKN_
 
         B _ C l o s e P r n ( )   KNMRWL0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ P r n _ B a r c o d e ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NPhxTR
N_R0
 
 
 
 l
 
     V C : 
 
         i n t   B _ P r n _ B a r c o d e ( i n t   x ,   i n t   y ,   i n t   o r i ,   c h a r   t y p e [ 4 ] ,   i n t   n ,   i n t   w ,   i n t   h e i g h t , 
 
             c h a r   h u m a n ,   L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ B a r c o d e ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   B y V a l   o r i   A s   L o n g ,   _ 
 
             B y V a l   T T y p e   A s   S t r i n g ,   B y V a l   n a r r o w   A s   L o n g ,   B y V a l   w i d t h   A s   L o n g ,   _ 
 
             B y V a l   h e i g h t   A s   L o n g ,   B y V a l   h u m a n   A s   B y t e ,   B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ B a r c o d e ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   o r i   A s   I n t e g e r ,   B y V a l   T T y p e   A s   S t r i n g ,   B y V a l   n a r r o w   A s   I n t e g e r ,   _ 
 
             B y V a l   w i d t h   A s   I n t e g e r ,   B y V a l   h e i g h t   A s   I n t e g e r ,   B y V a l   h u m a n   A s   B y t e ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         o r i ; 
 
             RpSeT[MO' 0 ' /f  0  ' 1 ' /f9 0  0' 2 ' /f1 8 0  ' 3 ' /f2 7 0  
 
         t y p e ; 
 
             hxW_0YNh
 
             + = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = + 
 
             |   t y p e |                     hx=~^                      |   t y p e |                       hx=~^                      | 
 
             + = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = + 
 
             |     0     |   C o d e   1 2 8   U C C   ( s h i p p i n g   c o n t - |     E 8 0 |   E A N - 8                                                 |     
 
             |           |   a i n e r   c o d e )                                   + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +     E 8 2 |   E A N - 8   2   d i g i t   a d d - o n                   | 
 
             |     1     |   C o d e   1 2 8   s u b s e t   A , B   a n d   C       + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +     E 8 5 |   E A N - 8   5   d i g i t   a d d - o n                   | 
 
             |     1 E   |   U C C / E A N                                           + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +     K     |   C o d a b a r                                             | 
 
             |     2     |   I n t e r l e a v e d   2   o f   5                     + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +     P     |   P o s t n e t                                             | 
 
             |     2 C   |   I n t e r l e a v e d   2   o f   5   w i t h   c h e - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |           |   c k   s u m   d i g i t                                 |     U A 0 |   U P C - A                                                 | 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |     2 D   |   I n t e r l e a v e d   2   o f   5   w i t h   h u m - |     U A 2 |   U P C - A   2   d i g i t   a d d - o n                   | 
 
             |           |   a n   r e a d a b l e   c h e c k   d i g i t           + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +     U A 5 |   U P C - A   5   d i g i t   a d d - o n                   | 
 
             |     2 G   |   G e r m a n   P o s t c o d e                           + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +     U E 0 |   U P C - E                                                 | 
 
             |     2 M   |   M a t r i x   2   o f   5                               + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +     U E 2 |   U P C - E   2   d i g i t   a d d - o n                   | 
 
             |     2 U   |   U P C   I n t e r l e a v e d   2   o f   5             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +     U E 5 |   U P C - E   5   d i g i t   a d d - o n                   | 
 
             |     3     |   C o d e   3   o f   9                                   + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +     R 1 4 | R S S - 1 4                                                 | 
 
             |     3 C   |   C o d e   3   o f   9   w i t h   c h e c k   s u m     + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |           |   d i g i t                                               |     R L   | R S S   L i m i t e d                                       | 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |     9     |   C o d e   9 3                                           |     R S   | R S S   S t a c k e d                                       |   
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |     E 3 0 |   E A N - 1 3                                             |     R T   | R S S   T r u n c a t e d                                   | 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |     E 3 2 |   E A N - 1 3   2   d i g i t   a d d - o n               |     R S O | R S S   S t a c k e d   O m n i d i r e c t i o n a         | 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |     E 3 5 |   E A N - 1 3   5   d i g i t   a d d - o n               |     R E X | R S S   E x p a n d e d                                     | 
 
             + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
         n ; 
 
             N A R R O W   b a r   [^(W g\UMO
 
             /fR S S hxGRdkSxephx[^v
Pxe{
Wp1 ~ 1 0 -<Pp1 0
 
         w ; 
 
             W I D E   b a r   [^(W g\UMO
 
             /fR S S hxGRdkSxepkRhxSS+Tv g'Yǌe@SJXxeϑS(WO(uR S S   E x p a n d e d hxBf
 
             	gHe(WvQ[^WvR S S hx-NGRp!qHeSxe{
Wp2 ~ 2 2 -<Pp2 2 Ndk<P_ pvPxe0
 
         h e i g h t ; 
 
             hxؚ^0
 
             R S S hxvjnv g\ؚ^P6R: 
 
             R 1 4   - >   3 3   p i x e l s 
 
             R L     - >   1 0   p i x e l s 
 
             R S     - >   1 3   p i x e l s 
 
             R T     - >   1 3   p i x e l s 
 
             R S O   - >   6 9   p i x e l s 
 
             R E X   - >   3 4   p i x e l s 
 
         h u m a n ; 
 
             vu  h u m a n   /f' N ' BfGR
NRpSeW[vu  h u m a n   /f' B ' BfGRRpSSeW[0
 
         d a t a ; 
 
             ǌeW[2Neǌe+gzR
N< O p e r a t i o n   N u m b e r > GRS	g_R
 
             O p e r a t i o n :   +   o r   -   _N u m b e r :   0   ~   3 2 7 6 8   xe<P0
 
             (WR S S  R
N2 D ( c o m p o s i t e   s y m b o l ) vǌeBf,    R
N' | ' &{_,   Y1 2 3 4 5 6 7 8 9 0 1 2 3 | 1 2 3 . 
 
             R S S hxv g'Yxe<PP6R: 
 
             R 1 4   - >   9 9 9 9 9 9 9 9 9 9 9 9 9 
 
             R L     - >   1 9 9 9 9 9 9 9 9 9 9 9 9 
 
             R S     - >   9 9 9 9 9 9 9 9 9 9 9 9 9 
 
             R T     - >   9 9 9 9 9 9 9 9 9 9 9 9 9 
 
             R S O   - >   9 9 9 9 9 9 9 9 9 9 9 9 9 
 
             R E X   - >   7 4   d i g i t s 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ P r n _ B a r c o d e ( 6 5 0 ,   1 5 ,   0 ,   " E 8 0 " ,   2 ,   2 ,   5 1 ,   ' B ' ,   " 1 2 3 4 5 6 7 " ) ;   / /   n o   c o u n t e r 
 
             o r 
 
         B _ P r n _ B a r c o d e ( 6 5 0 ,   1 5 ,   0 ,   " E 8 0 " ,   2 ,   2 ,   5 1 ,   ' B ' ,   " 1 2 3 4 5 6 7 < + 1 0 > " ) ; / / h a v e   a   c o u n t e r 
 
             o r   
 
         B _ P r n _ B a r c o d e ( 6 5 0 ,   1 5 ,   0 ,   " R 1 4 " ,   2 ,   0 ,   3 3 ,   ' B ' ,   " 1 2 3 4 5 6 7 8 9 0 1 2 3 | R 1 4 " ) ;   D a t a B a r   +   C S 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ P r n _ B a r c o d e ( 6 5 0 ,   1 5 ,   0 ,   " E 8 0 " ,   2 ,   2 ,   5 1 ,   A s c ( " B " ) ,   " 1 2 3 4 5 6 7 " )   
 
             ' n o   c o u n t e r 
 
             o r 
 
         C a l l   B _ P r n _ B a r c o d e ( 6 5 0 ,   1 5 ,   0 ,   " E 8 0 " ,   2 ,   2 ,   5 1 ,   A s c ( " B " ) ,   " 1 2 3 4 5 6 7 < + 1 0 > " )   
 
             ' h a v e   a   c o u n t e r 
 
             o r   
 
         C a l l   B _ P r n _ B a r c o d e ( 6 5 0 ,   1 5 ,   0 ,   " R 1 4 " ,   2 ,   0 ,   3 3 ,   A s c ( " B " ) ,   " 1 2 3 4 5 6 7 8 9 0 1 2 3 | R 1 4 " )   
 
             ' D a t a B a r   +   C S 
 
 
 
 f    P  B _ P r n _ B a r c o d e   QxeSNRpSQ NPyr[  B a r c o d e   TR
N_R0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ P r n _ C o n f i g u r a t i o n ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    RpSpSh_jgQMn0
 
 
 
 l
 
     V C : 
 
         v o i d   B _ P r n _ C o n f i g u r a t i o n ( v o i d ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         D e c l a r e   S u b   B _ P r n _ C o n f i g u r a t i o n ( ) 
 
 
 
 {O
 
     V C : 
 
         B _ P r n _ C o n f i g u r a t i o n ( ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ P r n _ C o n f i g u r a t i o n ( ) 
 
 
 
 f    P  B _ P r n _ C o n f i g u r a t i o n   QxegRpSpSh_jgQMnS+T-[0
 
         f i r m w a r e   Hr,g0a c c e s s o r i e s 0I{. . . . 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ P r n _ T e x t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NLeW[TR
N_R0
 
 
 
 l
 
     V C : 
 
         i n t   B _ P r n _ T e x t ( i n t   x ,   i n t   y ,   i n t   o r i ,   i n t   f o n t ,   i n t   h o r _ f a c t o r ,   i n t   v e r _ f a c t o r , 
 
             c h a r   m o d e ,   L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ T e x t ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   B y V a l   o r i   A s   L o n g ,   _ 
 
             B y V a l   f o n t   A s   L o n g ,   B y V a l   h o r _ f a c t o r   A s   L o n g ,   B y V a l   v e r _ f a c t o r   A s   L o n g ,   _ 
 
             B y V a l   m o d e   A s   B y t e ,   B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ T e x t ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   o r i   A s   I n t e g e r ,   B y V a l   f o n t   A s   I n t e g e r ,   B y V a l   h o r _ f a c t o r   A s   I n t e g e r ,   _ 
 
             B y V a l   v e r _ f a c t o r   A s   I n t e g e r ,   B y V a l   m o d e   A s   B y t e ,   B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         o r i ; 
 
             RpSeT[MO' 0 ' /f  0  ' 1 ' /f9 0  0' 2 ' /f1 8 0  ' 3 ' /f2 7 0  
 
         f o n t ; 
 
             xdW[b_1 ^5   xd8^GOW[b_0
 
         h o r _ f a c t o r ; 
 
             4ls^>e'YkO{
W1 ^2 4 0
 
         v e r _ f a c t o r ; 
 
             Wv>e'YkO{
W1 ^2 4 0
 
         m o d e ; 
 
             S}vR' N ' nfeW[' R ' S}veW[0
 
         d a t a ; 
 
             ǌeW[2Nvu>\zǌeR
N  < O p e r a t i o n   N u m b e r >   <h_pR
N_R
 
             O p e r a t i o n :   +   o r   -   _N u m b e r :   0   ~   3 2 7 6 8   xe<P0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ P r n _ T e x t ( 5 0 ,   1 1 0 ,   0 ,   4 ,   1 ,   1 ,   ' N ' ,   " A 1 2 3 4 5 6 " ) ;   / / !q_R
 
             o r 
 
         B _ P r n _ T e x t ( 5 0 ,   1 1 0 ,   0 ,   4 ,   1 ,   1 ,   ' N ' ,   " A 1 2 3 4 5 6 < - 1 > " ) ;   / / 	g_R
 
     V B :   V B A ;   V B . n e t : 
 
         B _ P r n _ T e x t ( 5 0 ,   1 1 0 ,   0 ,   4 ,   1 ,   1 ,   A s c ( " N " ) ,   " A 1 2 3 4 5 6 " )   ' n o   c o u n t e r 
 
             o r 
 
         B _ P r n _ T e x t ( 5 0 ,   1 1 0 ,   0 ,   4 ,   1 ,   1 ,   A s c ( " N " ) ,   " A 1 2 3 4 5 6 < - 1 > " )   ' h a v e   a   c o u n t e r 
 
 
 
 f    P  B _ P r n _ T e x t   QxeSNRpSQ NLeW[TR
N_R0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ P r n _ T e x t _ C h i n e s e ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NLeW[O(u-NeޞwcW[WjHh  ( 1 6 * 1 5   b  2 4 * 2 4 ) 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ P r n _ T e x t _ C h i n e s e ( i n t   x ,   i n t   y ,   i n t   f o n t t y p e ,   L P C T S T R   i d _ n a m e ,   L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ T e x t _ C h i n e s e ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   f o n t t y p e   A s   L o n g ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ T e x t _ C h i n e s e ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   f o n t t y p e   A s   I n t e g e r ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0( d o t ) 
 
         y ; 
 
             Y   ^j0( d o t ) 
 
         f o n t t y p e ; 
 
             wcW[Wxd00   - >   1 6 * 1 5 01   - >   2 4 * 2 4 0
 
         i d _ n a m e ; 
 
             f}N NPX%R
T1zX[>eepSh_jgQN_vcO(u  B _ L o a d _ P c x ( )   sSS\
W|TSQO0
 
         d a t a ; 
 
             eW[gQ[0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ O p e n _ C h i n e s e F o n t ( " C : \ \ E T 3 " ) ; 
 
         B _ P r n _ T e x t _ C h i n e s e ( 1 0 0 ,   1 0 0 ,   0 ,   " A 0 1 " ,   " W[)RvvuMR!B#C$D" ) ; 
 
     V B :   V B A ;   V B . n e t : 
 
         C a l l   B _ O p e n _ C h i n e s e F o n t ( " C : \ \ E T 3 " ) 
 
         C a l l   B _ P r n _ T e x t _ C h i n e s e ( 1 0 0 ,   1 0 0 ,   0 ,   " A 0 1 " ,   " W[)RvvuMR!B#C$D" ) 
 
 
 
 f    P  B _ P r n _ T e x t _ C h i n e s e   QxeSNpSQ NLeW[O(u-NeޞwcW[WjHh
 
         ( 1 6 * 1 5   b  2 4 * 2 4 ) 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ P r n _ T e x t _ T r u e T y p e ( ) 
 
 B _ P r n _ T e x t _ T r u e T y p e _ W ( ) 
 
 B _ P r n _ T e x t _ T r u e T y p e _ U n i ( ) 
 
 B _ P r n _ T e x t _ T r u e T y p e _ U n i B ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NL  T r u e   T y p e   F o n t   eW[0
 
 
 
 l
 
     V C : 
 
         i n t   B _ P r n _ T e x t _ T r u e T y p e ( i n t   x ,   i n t   y ,   i n t   F S i z e ,   L P C T S T R   F T y p e ,   i n t   F s p i n , 
 
             i n t   F W e i g h t ,   i n t   F I t a l i c ,   i n t   F U n l i n e ,   i n t   F S t r i k e O u t ,   L P C T S T R   i d _ n a m e , 
 
             L P C T S T R   d a t a ) ; 
 
         i n t   B _ P r n _ T e x t _ T r u e T y p e _ W ( i n t   x ,   i n t   y ,   i n t   F H e i g h t ,   i n t   F W i d t h ,   L P C T S T R   F T y p e , 
 
             i n t   F s p i n ,   i n t   F W e i g h t ,   i n t   F I t a l i c ,   i n t   F U n l i n e ,   i n t   F S t r i k e O u t ,   L P C T S T R   i d _ n a m e , 
 
             L P C T S T R   d a t a ) ; 
 
         i n t   B _ P r n _ T e x t _ T r u e T y p e _ U n i ( i n t   x ,   i n t   y ,   i n t   F S i z e ,   L P C T S T R   F T y p e ,   i n t   F s p i n , 
 
             i n t   F W e i g h t ,   i n t   F I t a l i c ,   i n t   F U n l i n e ,   i n t   F S t r i k e O u t ,   L P C T S T R   i d _ n a m e ,   
 
             L P C W S T R   d a t a ,   i n t   f o r m a t ) ; 
 
         i n t   B _ P r n _ T e x t _ T r u e T y p e _ U n i B ( i n t   x ,   i n t   y ,   i n t   F S i z e ,   L P C T S T R   F T y p e ,   i n t   F s p i n , 
 
             i n t   F W e i g h t ,   i n t   F I t a l i c ,   i n t   F U n l i n e ,   i n t   F S t r i k e O u t ,   L P C T S T R   i d _ n a m e ,   
 
             L P C T S T R   d a t a ,   i n t   f o r m a t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ T e x t _ T r u e T y p e ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   F S i z e   A s   L o n g ,   B y V a l   F T y p e   A s   S t r i n g ,   B y V a l   F s p i n   A s   L o n g ,   _ 
 
             B y V a l   F W e i g h t   A s   L o n g ,   B y V a l   F I t a l i c   A s   L o n g ,   B y V a l   F U n l i n e   A s   L o n g ,   _ 
 
             B y V a l   F S t r i k e O u t   A s   L o n g ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ T e x t _ T r u e T y p e _ W ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   F H e i g h t   A s   L o n g ,   B y V a l   F W i d t h   A s   L o n g ,   B y V a l   F T y p e   A s   S t r i n g ,   _ 
 
             B y V a l   F s p i n   A s   L o n g ,   B y V a l   F W e i g h t   A s   L o n g ,   B y V a l   F I t a l i c   A s   L o n g ,   _ 
 
             B y V a l   F U n l i n e   A s   L o n g ,   B y V a l   F S t r i k e O u t   A s   L o n g ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ T e x t _ T r u e T y p e _ U n i ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   F S i z e   A s   L o n g ,   B y V a l   F T y p e   A s   S t r i n g ,   B y V a l   F s p i n   A s   L o n g ,   _ 
 
             B y V a l   F W e i g h t   A s   L o n g ,   B y V a l   F I t a l i c   A s   L o n g ,   B y V a l   F U n l i n e   A s   L o n g ,   _ 
 
             B y V a l   F S t r i k e O u t   A s   L o n g ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y R e f   d a t a   A s   B y t e ,   _ 
 
             B y V a l   f o r m a t   A s   L o n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ T e x t _ T r u e T y p e _ U n i B ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   F S i z e   A s   L o n g ,   B y V a l   F T y p e   A s   S t r i n g ,   B y V a l   F s p i n   A s   L o n g ,   _ 
 
             B y V a l   F W e i g h t   A s   L o n g ,   B y V a l   F I t a l i c   A s   L o n g ,   B y V a l   F U n l i n e   A s   L o n g ,   _ 
 
             B y V a l   F S t r i k e O u t   A s   L o n g ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y R e f   d a t a   A s   B y t e ,   _ 
 
             B y V a l   f o r m a t   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ T e x t _ T r u e T y p e ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   F S i z e   A s   I n t e g e r ,   B y V a l   F T y p e   A s   S t r i n g ,   B y V a l   F s p i n   A s   I n t e g e r ,   _ 
 
             B y V a l   F W e i g h t   A s   I n t e g e r ,   B y V a l   F I t a l i c   A s   I n t e g e r ,   B y V a l   F U n l i n e   A s   I n t e g e r ,   _ 
 
             B y V a l   F S t r i k e O u t   A s   I n t e g e r ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ T e x t _ T r u e T y p e _ W ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   F H e i g h t   A s   I n t e g e r ,   B y V a l   F W i d t h   A s   I n t e g e r ,   B y V a l   F T y p e   A s   S t r i n g ,   _ 
 
             B y V a l   F s p i n   A s   I n t e g e r ,   B y V a l   F W e i g h t   A s   I n t e g e r ,   B y V a l   F I t a l i c   A s   I n t e g e r ,   _ 
 
             B y V a l   F U n l i n e   A s   I n t e g e r ,   B y V a l   F S t r i k e O u t   A s   I n t e g e r ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ T e x t _ T r u e T y p e _ U n i ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   F S i z e   A s   I n t e g e r ,   B y V a l   F T y p e   A s   S t r i n g ,   B y V a l   F s p i n   A s   I n t e g e r ,   _ 
 
             B y V a l   F W e i g h t   A s   I n t e g e r ,   B y V a l   F I t a l i c   A s   I n t e g e r ,   B y V a l   F U n l i n e   A s   I n t e g e r ,   _ 
 
             B y V a l   F S t r i k e O u t   A s   I n t e g e r ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   d a t a   A s   B y t e ( ) ,   _ 
 
             B y V a l   f o r m a t   A s   I n t e g e r )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   B _ P r n _ T e x t _ T r u e T y p e _ U n i B ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   F S i z e   A s   I n t e g e r ,   B y V a l   F T y p e   A s   S t r i n g ,   B y V a l   F s p i n   A s   I n t e g e r ,   _ 
 
             B y V a l   F W e i g h t   A s   I n t e g e r ,   B y V a l   F I t a l i c   A s   I n t e g e r ,   B y V a l   F U n l i n e   A s   I n t e g e r ,   _ 
 
             B y V a l   F S t r i k e O u t   A s   I n t e g e r ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   d a t a   A s   B y t e ( ) ,   _ 
 
             B y V a l   f o r m a t   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j,   UMO:   P }0
 
         y ; 
 
             Y   ^j,   UMO:   P }0
 
         F S i z e ; 
 
             T r u e T y p e   f o n t   s i z e UMOpޞ( d o t ) 0
 
         F H e i g h t ; 
 
             W[Wؚ^UMOpޞ( d o t ) 0
 
         F W i d t h ; 
 
             W[W[^UMOpޞ( d o t ) 0
 
             F S i z e   /   F H e i g h t   /   F W i d t h   =   ( d p i   *   p o i n t )   /   7 2 . 
 
         F T y p e ; 
 
             T r u e T y p e   f o n t   W[W
T1z0
 
         F s p i n ; 
 
             T r u e T y p e   f o n t   W[ԚeI01   - >   0 ,   2   - >   9 0 ,   3   - >   1 8 0 ,   4   - >   2 7 0 
 
         F W e i g h t ; 
 
             T r u e T y p e   f o n t   W[Ԛ|0}0
 
             0   a n d   N U L L   a n d   4 0 0   - >   4 0 0   jn0
 
             1 0 0   - >   ^8^0}02 0 0   - >   ui0}0
 
             3 0 0   - >   0}        05 0 0   - >   -NI{0
 
             6 0 0   - >   JS|    07 0 0   - >   |    0
 
             8 0 0   - >   yr|    09 0 0   - >   ўԚ0
 
         F I t a l i c ; 
 
             T r u e T y p e   f o n t   W[ԚeԚ00   - >   F A L S E 01   - >   T R U E 0
 
         F U n l i n e ; 
 
             T r u e T y p e   f o n t   W[ԚR^}00   - >   F A L S E 01   - >   T R U E 0
 
         F S t r i k e O u t ; 
 
             T r u e T y p e   f o n t   W[ԚR*Rd}00   - >   F A L S E 01   - >   T R U E 0
 
         i d _ n a m e ; 
 
             f}N NPX%R
T1zX[>eepSh_jgQN_vcO(u  B _ L o a d _ P c x ( )   sSS\
W|TSQO0
 
         d a t a ; 
 
             eW[gQ[0
 
             B _ P r n _ T e x t _ T r u e T y p e _ U n i ( ) B _ P r n _ T e x t _ T r u e T y p e _ U n i B ( ) @b8eQvd a t a <h_pU T F - 8 0
 
             U T F - 1 6 bU n i c o d e   b i g   e n d i a n KNW[2NN p0 P}>\0
 
         f o r m a t ; 
 
             zl[U n i c o d e   d a t a v㉼xe_0
 
             0   - >   1uW[2N-vB O M ( B y t e   O r d e r   M a r k ) zl[0
 
             1   - >   U T F - 1 6 0
 
             2   - >   U n i c o d e   b i g   e n d i a n 0
 
             3   - >   U T F - 8 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         c h a r   * p b u f   =   n e w   c h a r [ 1 2 8 ] ; 
 
         B _ P r n _ T e x t _ T r u e T y p e ( 3 0 ,   1 0 0 ,   3 0 ,   " A r i a l " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   " A A " ,   " T r u e T y p e   F o n t " ) ; 
 
             / / s a v e   i n   p r i n t e r . 
 
         B _ P r n _ T e x t _ T r u e T y p e _ W ( 3 0 ,   1 6 0 ,   2 0 ,   2 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   " A B " ,   
 
             " T T _ W :   YW[CQ,nf" ) ; 
 
         B _ P r n _ T e x t _ T r u e T y p e _ U n i ( 3 0 ,   2 2 0 ,   3 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   " A C " , 
 
             L " T T _ U n i :   YW[CQ,nf" , 1 ) ; / / U T F - 1 6 
 
         s t r c p y ( p b u f ,   " \ x F F \ x F E " ) ; / / U T F - 1 6 . 
 
         m e m c p y ( & p b u f [ 2 ] ,   ( c h a r   * ) L " T T _ U n i B :   YW[CQ,nf" ,   1 5 * 2 ) ; / / c o p y   m u t i l   b y t e . 
 
         B _ P r n _ T e x t _ T r u e T y p e _ U n i B ( 3 0 ,   2 8 0 ,   3 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   " A D " , 
 
             p b u f ,   0 ) ; / / B y t e   O r d e r   M a r k . 
 
     V B : 
 
         D i m   b u f f 1 ( 1 2 8 )   A s   B y t e 
 
         D i m   b u f f 2 ( )   A s   B y t e 
 
         D i m   i   A s   L o n g 
 
         C a l l   B _ P r n _ T e x t _ T r u e T y p e ( 3 0 ,   1 0 0 ,   3 0 ,   " A r i a l " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   " A A " ,   _ 
 
             " T r u e T y p e   F o n t " )   ' s a v e   i n   p r i n t e r . 
 
         C a l l   B _ P r n _ T e x t _ T r u e T y p e _ W ( 3 0 ,   1 6 0 ,   2 0 ,   2 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   _ 
 
             " A B " ,   " T T _ W :   YW[CQ,nf" ) 
 
         b u f f 2   =   S t r C o n v ( " T T _ U n i :   YW[CQ,nf" ,   v b N a r r o w )   
 
             ' C o n v e r t s   U N I C O D E ( w i d e   c h a r a c t e r s )   t o   s i n g l e - b y t e   c h a r a c t e r s . 
 
         F o r   i   =   L B o u n d ( b u f f 2 )   T o   U B o u n d ( b u f f 2 ) 
 
                 b u f f 1 ( i )   =   b u f f 2 ( i ) 
 
         N e x t   i 
 
         b u f f 1 ( 2 6 )   =   0   ' n u l l . 
 
         b u f f 1 ( 2 7 )   =   0 
 
         C a l l   B _ P r n _ T e x t _ T r u e T y p e _ U n i ( 3 0 ,   2 2 0 ,   3 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   _ 
 
             " A C " ,   b u f f 1 ( 0 ) ,   1 )   ' U T F - 1 6 
 
         b u f f 1 ( 0 )   =   2 5 5   ' U T F - 1 6 . 
 
         b u f f 1 ( 1 )   =   2 5 4 
 
         b u f f 2   =   S t r C o n v ( " T T _ U n i B :   YW[CQ,nf" ,   v b N a r r o w )   
 
             ' C o n v e r t s   U N I C O D E ( w i d e   c h a r a c t e r s )   t o   s i n g l e - b y t e   c h a r a c t e r s . 
 
         F o r   i   =   L B o u n d ( b u f f 2 )   T o   U B o u n d ( b u f f 2 ) 
 
                 b u f f 1 ( i   +   2 )   =   b u f f 2 ( i ) 
 
         N e x t   i 
 
         b u f f 1 ( 3 0 )   =   0   ' n u l l . 
 
         b u f f 1 ( 3 1 )   =   0 
 
         C a l l   B _ P r n _ T e x t _ T r u e T y p e _ U n i B ( 3 0 ,   2 8 0 ,   3 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   _ 
 
             " A D " ,   b u f f 1 ( 0 ) ,   0 )   ' B y t e   O r d e r   M a r k . 
 
     V B . n e t : 
 
         D i m   p b u f ( 1 2 8 )   A s   B y t e 
 
         D i m   e n c U n i c o d e   =   S y s t e m . T e x t . E n c o d i n g . U n i c o d e 
 
         C a l l   B _ P r n _ T e x t _ T r u e T y p e ( 3 0 ,   1 0 0 ,   3 0 ,   " A r i a l " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   " A A " ,   " T r u e T y p e   F o n t " ) 
 
             ' s a v e   i n   p r i n t e r . 
 
         C a l l   B _ P r n _ T e x t _ T r u e T y p e _ W ( 3 0 ,   1 6 0 ,   2 0 ,   2 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   _ 
 
             " A B " ,   " T T _ W :   YW[CQ,nf" ) 
 
         C a l l   B _ P r n _ T e x t _ T r u e T y p e _ U n i ( 3 0 ,   2 2 0 ,   3 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   _ 
 
             " A C " ,   e n c U n i c o d e . G e t B y t e s ( " T T _ U n i :   YW[CQ,nf" ) ,   1 )   ' U T F - 1 6 
 
         p b u f ( 0 )   =   2 5 5   ' U T F - 1 6 . 
 
         p b u f ( 1 )   =   2 5 4 
 
         e n c U n i c o d e . G e t B y t e s ( " T T _ U n i B :   YW[CQ,nf" ,   0 ,   1 4 ,   p b u f ,   2 )   ' c o p y   m u t i l   b y t e . 
 
         p b u f ( 3 0 )   =   0   ' n u l l . 
 
         p b u f ( 3 1 )   =   0 
 
         C a l l   B _ P r n _ T e x t _ T r u e T y p e _ U n i B ( 3 0 ,   2 8 0 ,   3 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   _ 
 
             " A D " ,   p b u f ,   0 )   ' B y t e   O r d e r   M a r k . 
 
 
 
 f    P  B _ P r n _ T e x t _ T r u e T y p e ( )   QxeSNpSQ NL  T r u e   T y p e   F o n t   eW[0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e l e c t _ O p t i o n ( ) 
 
 B _ S e l e c t _ O p t i o n 2 ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[IpS!j_0_UR  C u t t e r   b  P e e l 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e l e c t _ O p t i o n ( i n t   o b j e c t ) ; 
 
         i n t   B _ S e l e c t _ O p t i o n 2 ( i n t   o b j e c t ,   i n t   p ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e l e c t _ O p t i o n ( B y V a l   o b j e c t   A s   L o n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   B _ S e l e c t _ O p t i o n 2 ( B y V a l   o b j e c t   A s   L o n g ,   B y V a l   p   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e l e c t _ O p t i o n ( B y V a l   o b j e c t   A s   I n t e g e r )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   B _ S e l e c t _ O p t i o n 2 ( B y V a l   o b j e c t   A s   I n t e g e r ,   _ 
 
             B y V a l   p   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         o b j e c t ; 
 
             pSh_jRx0
 
             1   - >   _UqIܕ  C u t t e r   T  P e e l 0
 
             2   - >   _Uqaܕ  C u t t e r   T  P e e l 0
 
             3   - >   _UqaT  C u t t e r ܕ  P e e l 0
 
             4   - >   _UqaT  P e e l ܕ  C u t t e r 0
 
             5   - >   _UqIT  C u t t e r ܕ  P e e l 0
 
             6   - >   _UqIT  P e e l ܕ  C u t t e r 0
 
         p ; 
 
             -[C u t t e r R5_xe, O(uC u t t e r BfMb	gHe. 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e l e c t _ O p t i o n ( 1 ) ; 
 
         B _ S e l e c t _ O p t i o n 2 ( 3 ,   2 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e l e c t _ O p t i o n ( 1 ) 
 
         C a l l   B _ S e l e c t _ O p t i o n 2 ( 2 ,   3 ) 
 
 
 
 f    B _ S e l e c t _ O p t i o n ,   B _ S e l e c t _ O p t i o n 2 QxeSNxd
NT  P r i n t e r   xOpS
 
         h_jOdNx]\O0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e l e c t _ S y m b o l ( ) 
 
 B _ S e l e c t _ S y m b o l 2 ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    &{_-[xd0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e l e c t _ S y m b o l ( i n t   n u m _ b i t ,   i n t   s y m b o l ,   i n t   c o u n t r y ) ; 
 
         i n t   B _ S e l e c t _ S y m b o l 2 ( i n t   n u m _ b i t ,   c h a r   c s y m b o l [ 2 ] ,   i n t   c o u n t r y ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e l e c t _ S y m b o l ( B y V a l   n u m _ b i t   A s   L o n g ,   B y V a l   s y m b o l   A s   L o n g ,   _ 
 
             B y V a l   c o u n t r y   A s   L o n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   B _ S e l e c t _ S y m b o l 2 ( B y V a l   n u m _ b i t   A s   L o n g ,   B y V a l   c s y m b o l   A s   s t r i n g ,   _ 
 
             B y V a l   c o u n t r y   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e l e c t _ S y m b o l ( B y V a l   n u m _ b i t   A s   I n t e g e r ,   B y V a l   s y m b o l   A s   I n t e g e r ,   _ 
 
             B y V a l   c o u n t r y   A s   I n t e g e r )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   B _ S e l e c t _ S y m b o l 2 ( B y V a l   n u m _ b i t   A s   I n t e g e r ,   B y V a l   c s y m b o l   A s   s t r i n g ,   _ 
 
             B y V a l   c o u n t r y   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n u m _ b i t ; 
 
             ǌeMOCQxeϑ08   /f  8 - b i t   d a t a   T  7   /f  7 - b i t   d a t a 0
 
         s y m b o l ; 
 
             &{_-[0NhP;]^gQ[&{_-[/f  C o d e   p a g e   4 3 7 ( E n g l i s h ) 0
 
             + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |               8   b i t   d a t a                     |               7   b i t   d a t a                     | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             | s y m b o l |         C o d e   p a g e               | s y m b o l |           C o d e   p a g e             | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     0       | E n g l i s h ( 4 3 7 )                 |     0       | U S A S C I I                           | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     1       | L a t i n ( 8 5 0 )                     |     1       | B r i t i s h                           | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     2       | S l a v i c ( 8 5 2 )                   |     2       | G e r m a n                             | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     3       | P o r t u g a l ( 8 6 0 )               |     3       | F r e n c h                             | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     4       | C a n a d i a n ? F r e n c h ( 8 6 3 ) |     4       | D a n i s h                             | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     5       | N o r d i c ( 8 6 5 )                   |     5       | I t a l i a n                           | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |             |                                         |     6       | S p a n i s h                           | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |             |                                         |     7       | S w e d i s h                           | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |             |                                         |     8       | S w i s s                               | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
         c s y m b o l ; 
 
             &{_-[0NhP;]^gQ[&{_-[/f  C o d e   p a g e   4 3 7 ( E n g l i s h ) 0
 
             + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |               8   b i t   d a t a                     |               7   b i t   d a t a                     | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             | s y m b o l |         C o d e   p a g e               | s y m b o l |           C o d e   p a g e             | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     0       | E n g l i s h ( 4 3 7 )                 |     0       | U S A S C I I                           | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     1       | L a t i n ( 8 5 0 )                     |     1       | B r i t i s h                           | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     2       | S l a v i c ( 8 5 2 )                   |     2       | G e r m a n                             | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     3       | P o r t u g a l ( 8 6 0 )               |     3       | F r e n c h                             | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     4       | C a n a d i a n / F r e n c h ( 8 6 3 ) |     4       | D a n i s h                             | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     5       | N o r d i c ( 8 6 5 )                   |     5       | I t a l i a n                           | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     6       | T u r k i s h ( 8 5 7 )                 |     6       | S p a n i s h                           | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     7       | I c e l a n d i c ( 8 6 1 )             |     7       | S w e d i s h                           | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     8       | H e b r e w ( 8 6 2 )                   |     8       | S w i s s                               | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     9       | C y r i l l i c ( 8 5 5 )               |             |                                         | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     1 0     | C y r i l l i c   C I S ( 8 6 6 )       |             |                                         | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     1 1     | G r e e k ( 7 3 7 )                     |             |                                         | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     1 2     | G r e e k ( 8 5 1 )                     |             |                                         | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     1 3     | G r e e k ( 8 6 9 )                     |             |                                         | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     A       | L a t i n ( 1 2 5 2 )                   |             |                                         | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     B       | L a t i n ( 1 2 5 0 )                   |             |                                         | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     C       | C y r i l l i c ( 1 2 5 1 )             |             |                                         | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     D       | G r e e k ( 1 2 5 3 )                   |             |                                         | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     E       | T u r k i s h ( 1 2 5 4 )               |             |                                         | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
             |     F       | H e b r e w ( 1 2 5 5 )                 |             |                                         | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + 
 
         c o u n t r y ; 
 
             K D U   c o u n t r y   c o d e . 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e l e c t _ S y m b o l ( 7 ,   5 ,   1 ) ; 
 
             o r 
 
         B _ S e l e c t _ S y m b o l 2 ( 7 ,   " 5 " ,   1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e l e c t _ S y m b o l ( 7 ,   5 ,   1 ) 
 
             o r 
 
         C a l l   B _ S e l e c t _ S y m b o l 2 ( 7 ,   " 5 " ,   1 ) 
 
 
 
 f    P  B _ S e l e c t _ S y m b o l   QxeSNxdivu&{_-[0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ B a c k f e e d ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    _UR  B a c k   f e e d 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ B a c k f e e d ( c h a r   o p t i o n ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ B a c k f e e d ( B y V a l   o p t i o n s   A s   B y t e )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ B a c k f e e d ( B y V a l   o p t i o n s   A s   B y t e )   A s   I n t e g e r 
 
 
 
 Sxe
 
         o p t i o n ; 
 
             Rx" B "   ܕ  B a c k   f e e d 0" F "   _UR  B a c k   f e e d 0
 
             [STQ N[w^O(uw0RpSQP}g0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ B a c k f e e d ( ' B ' ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ B a c k f e e d ( A s c ( " B " ) ) 
 
 
 
 f    P  B _ S e t _ B a c k f e e d   QxeSNte\Pbkޞ0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ B a c k f e e d _ O f f s e t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[  B a c k   F e e d   OPyϑ( S(ued}!j_) . 
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ B a c k f e e d _ O f f s e t ( i n t   o f f s e t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ B a c k f e e d _ O f f s e t ( B y V a l   o f f s e t   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ B a c k f e e d _ O f f s e t ( B y V a l   o f f s e t   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         o f f s e t ; 
 
             b a c k   f e e d   OPyϑ{
W- 1 2 7 ^1 2 7   p i x e l s . 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ B a c k f e e d ( ' F ' ) ; 
 
         B _ S e l e c t _ O p t i o n ( 2 ) ; 
 
         B _ S e t _ B a c k f e e d _ O f f s e t ( 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ B a c k f e e d ( A s c ( " F " ) ) 
 
         C a l l   B _ S e l e c t _ O p t i o n ( 2 ) 
 
         C a l l   B _ S e t _ B a c k f e e d _ O f f s e t ( 0 ) 
 
 
 
 R E M A R K     P  B _ S e t _ B a c k f e e d _ O f f s e t   Q_ O(u  f i r m w a r e   2 0 1 2 / 1 0 / 1 5   bfevHr,g0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ C u t P e e l _ O f f s e t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[Rb]R}OPyϑ( S(ueR/ ]R}!j_) . 
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ C u t P e e l _ O f f s e t ( i n t   o f f s e t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ C u t P e e l _ O f f s e t ( B y V a l   o f f s e t   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ C u t P e e l _ O f f s e t ( B y V a l   o f f s e t   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         o f f s e t ; 
 
             Rb]R}OPyϑ{
W- 1 2 8 ^1 2 7   p i x e l s . 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e l e c t _ O p t i o n ( 3 ) ; 
 
         B _ S e t _ C u t P e e l _ O f f s e t ( 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e l e c t _ O p t i o n ( 3 ) 
 
         C a l l   B _ S e t _ C u t P e e l _ O f f s e t ( 0 ) 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ B M P S a v e ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    2QX[q_PWj0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ B M P S a v e ( i n t   n S a v e ,   c h a r   * p s t r B M P F N a m e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ B M P S a v e ( B y V a l   n S a v e   A s   L o n g ,   _ 
 
             B y V a l   p s t r B M P F N a m e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ B M P S a v e ( B y V a l   n S a v e   A s   I n t e g e r ,   _ 
 
             B y V a l   p s t r B M P F N a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n S a v e ; 
 
             1   - >   2QX[Wj
 
             0   - >   
N2QX[Wj
 
         p s t r B M P F N a m e ;   
 
             2QX[Wjv
T1z
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ B M P S a v e ( 1 ,   " C : \ \ T e m p B M P . b m p " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ B M P S a v e ( 1 ,   " C : \ \ T e m p B M P . b m p " ) 
 
 
 
 f    P  B _ S e t _ B M P S a v e   QxeSNzl[/f&T2QX[q_PWj0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ D a r k n e s s ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[qa-RpSq^0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ D a r k n e s s ( i n t   d a r k n e s s ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ D a r k n e s s ( B y V a l   d a r k n e s s   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ D a r k n e s s ( B y V a l   d a r k n e s s   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         d a r k n e s s ; 
 
             -[qa-RpSq^{
W0 ^1 5 gQ[/f  8 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ D a r k n e s s ( 9 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ D a r k n e s s ( 9 ) 
 
 
 
 f    P  B _ S e t _ D a r k n e s s   Qxec6Rq_Pom`_0Rf}YvpSQT`Oar
 
         na NNV }pSQWHh#j_0^0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ D e b u g D i a l o g ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[d/tX0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ D e b u g D i a l o g ( i n t   n E n a b l e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ D e b u g D i a l o g ( B y V a l   n E n a b l e   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ D e b u g D i a l o g ( B y V a l   n E n a b l e   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n E n a b l e ; 
 
             1   - >   d/tX
 
             0   - >   d/tXܕ
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ D e b u g D i a l o g ( 1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ D e b u g D i a l o g ( 1 ) 
 
 
 
 f    P  B _ S e t _ D e b u g D i a l o g   Qxe-[d/tXdNgVP/x_Ngy
 
         Qf:y
o`
\qFhY0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ D i r e c t i o n ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[RpSeT0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ D i r e c t i o n ( c h a r   d i r e c t i o n ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ D i r e c t i o n ( B y V a l   d i r e c t i o n   A s   B y t e )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ D i r e c t i o n ( B y V a l   d i r e c t i o n   A s   B y t e )   A s   I n t e g e r 
 
 
 
 Sxe
 
         d i r e c t i o n ; 
 
             -[RpSeT{
WB   T  T 0[P/f
\҉
\1z0gQ[/f  T 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ D i r e c t i o n ( ' T ' ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ D i r e c t i o n ( A s c ( " T " ) ) 
 
 
 
 f    P  B _ S e t _ D i r e c t i o n   Qxe-[RpSeT
\tePHrbgQ@b	gWb_eW[0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ F o r m ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    2QX[&NRpS  F O R M   ( h<h) 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ F o r m ( L P C T S T R   f o r m f i l e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ F o r m ( B y V a l   f o r m f i l e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ F o r m ( B y V a l   f o r m f i l e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         f o r m f i l e ; 
 
             h<hjHh
T1zS+T_0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ F o r m ( " d e m o . p r n " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ f o r m ( " d e m o . p r n " ) 
 
 
 
 f    P  B _ S e t _ F o r m   Qxe2QX[&NRpS  F O R M   ( h<h) 0(WO(uPQxeBfHQ
 
         (W  B _ P r i n t _ F o r m QxeKNMR0O(udkQxeBf1\_WL  B _ P r i n t _ F o r m ( ) 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ L a b g a p ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    TBf-[jd|w^S  G A P   w^0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ L a b g a p ( i n t   l a b l e n g t h ,   i n t   g a p l e n g t h ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ L a b g a p ( B y V a l   l a b l e n g t h   A s   L o n g ,   _ 
 
             B y V a l   g a p l e n g t h   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ L a b g a p ( B y V a l   l a b l e n g t h   A s   I n t e g e r ,   _ 
 
             B y V a l   g a p l e n g t h   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         l a b l e n g t h ; 
 
             (W g_q_P}kvjd|w^0UMO  d o t 0
 
         g a p l e n g t h ; 
 
             G A P   w^0vu/f#~}Bf_-p  0 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ L a b g a p ( 1 0 0 ,   2 0 ) ; 
 
     V B :   V B A ;   V B . n e t : 
 
         C a l l   B _ S e t _ L a b g a p ( 1 0 0 ,   2 0 ) 
 
 
 
 f    P  B _ S e t _ L a b g a p   Qxe-[jd|w^S  G A P   w^0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ L a b w i d t h ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[jd|[^0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ L a b w i d t h ( i n t   l a b w i d t h ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ L a b w i d t h ( B y V a l   l a b w i d t h   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ L a b w i d t h ( B y V a l   l a b w i d t h   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         l a b w i d t h ; 
 
             jd|[^0UMO  d o t 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ L a b w i d t h ( 2 5 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ L a b w i d t h ( 2 5 0 ) 
 
 
 
 f    P  B _ S e t _ L a b w i d t h   Qxe-[jd|[^0vuO(udkQxe1\
NO(u
 
         B _ S e t _ O r i g i n p o i n t   Qxe0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ O r i g i n p o i n t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[YRpSޞ0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ O r i g i n p o i n t ( i n t   h o r ,   i n t   v e r ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ O r i g i n p o i n t ( B y V a l   h o r   A s   L o n g ,   B y V a l   v e r   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ O r i g i n p o i n t ( B y V a l   h o r   A s   I n t e g e r ,   _ 
 
             B y V a l   v e r   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         h o r ; 
 
             4ls^LuWޞ0UMO  d o t 0
 
         v e r ; 
 
             WvLuWޞ0UMO  d o t 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ O r i g i n p o i n t ( 0 ,   0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ O r i g i n p o i n t ( 0 ,   0 ) 
 
 
 
 f    P  B _ S e t _ O r i g i n p o i n t   QxeO(u͑e-[wnޞ  X 0Y   0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ P r n c o m p o r t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[  S e r i a l   P o r t 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ P r n c o m p o r t ( i n t   b a u d ,   c h a r   p a r i t y ,   i n t   d a t a ,   i n t   s t o p ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ P r n c o m p o r t ( B y V a l   b a u d   A s   L o n g ,   B y V a l   p a r i t y   A s   B y t e ,   _ 
 
             B y V a l   d a t a   A s   L o n g ,   B y V a l   s t o p p   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ P r n c o m p o r t ( B y V a l   b a u d   A s   I n t e g e r ,   B y V a l   p a r i t y   A s   B y t e ,   _ 
 
             B y V a l   d a t a   A s   I n t e g e r ,   B y V a l   s t o p p   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         b a u d ; 
 
             >rsYNh
 
             3 8   - >   3 8 4 0 0 
 
             1 9   - >   1 9 2 0 0 
 
             9 6   - >   9 6 0 0 
 
             4 8   - >   4 8 0 0 
 
             2 4   - >   2 4 0 0 
 
             5 7   - >   5 7 6 0 0 
 
             1 1   - >   1 1 5 2 0 0 
 
         p a r i t y ; 
 
             P a r i t y 0' O ' /f  o d d ' E ' /f  e v e n   p a r i t y ,   ' N ' /f  n o n e   p a r i t y 0
 
         d a t a ; 
 
             D a t a   b i t   n u m b e r 7   b  8 0
 
         s t o p ; 
 
             S t o p   b i t   n u m b e r 1   b  2 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ P r n c o m p o r t ( 9 6 ,   ' N ' ,   8 ,   1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ P r n c o m p o r t ( 9 6 ,   A s c ( " N " ) ,   8 ,   1 ) 
 
 
 
 f    P  B _ S e t _ P r n c o m p o r t   Qxeg-[pSh_j^RW-[<PO9epSh_jvTe
 
         P C   ^RW-[<PYg
NTGR!ql  P C   #c0dkQxe_(WQxe  P r i n t _ O u t 
 
         KNMRWL_UhsWL0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ P r n c o m p o r t _ P C ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[  P C   ^RW0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ P r n c o m p o r t _ P C ( i n t   n B a u d R a t e ,   i n t   n B y t e S i z e ,   i n t   n P a r i t y ,   i n t   n S t o p B i t s , 
 
             i n t   n D s r ,   i n t   n C t s ,   i n t   n X o n X o f f ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ P r n c o m p o r t _ P C ( B y V a l   n B a u d R a t e   A s   L o n g ,   _ 
 
             B y V a l   n B y t e S i z e   A s   L o n g ,   B y V a l   n P a r i t y   A s   L o n g ,   B y V a l   n S t o p B i t s   A s   L o n g ,   _ 
 
             B y V a l   n D s r   A s   L o n g ,   B y V a l   n C t s   A s   L o n g ,   B y V a l   n X o n X o f f   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ P r n c o m p o r t _ P C ( B y V a l   n B a u d R a t e   A s   I n t e g e r ,   _ 
 
             B y V a l   n B y t e S i z e   A s   I n t e g e r ,   B y V a l   n P a r i t y   A s   I n t e g e r ,   B y V a l   n S t o p B i t s   A s   I n t e g e r ,   _ 
 
             B y V a l   n D s r   A s   I n t e g e r ,   B y V a l   n C t s   A s   I n t e g e r ,   B y V a l   n X o n X o f f   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n B a u d R a t e ; 
 
             >rsYNh
 
             1   - >   1 1 0           9   - >   1 9 2 0 0 
 
             2   - >   3 0 0         1 0   - >   3 8 4 0 0 
 
             3   - >   6 0 0         1 1   - >   5 6 0 0 0 
 
             4   - >   1 2 0 0       1 2   - >   5 7 6 0 0 
 
             5   - >   2 4 0 0       1 3   - >   1 1 5 2 0 0 
 
             6   - >   4 8 0 0       1 4   - >   1 2 8 0 0 0 
 
             7   - >   9 6 0 0       1 5   - >   2 5 6 0 0 0 
 
             8   - >   1 4 4 0 0       0   - >   9 6 0 0 
 
         n B y t e S i z e ; 
 
             D a t a   b i t   n u m b e r : 
 
             0   - >   7 - b i t   d a t a 
 
             7   - >   7 - b i t   d a t a 
 
             8   - >   8 - b i t   d a t a 
 
         n P a r i t y ; 
 
             P a r i t y YNh
 
             0   - >   n o n e   p a r i t y 
 
             1   - >   e v e n   p a r i t y 
 
             2   - >   o d d     p a r i t y 
 
         n S t o p B i t s ; 
 
             S t o p   b i t   n u m b e r : 
 
             0   - >   1   s t o p   b i t 
 
             1   - >   1   s t o p   b i t 
 
             2   - >   2   s t o p   b i t s 
 
         n D s r ; 
 
             S e t u p   h a r d w a r e   f l o w   c o n t r o l 
 
             1   - >   D T R   C O N T R O L   H A N D S H A K E ; 
 
             0   - >   D T R   C O N T R O L   E N A B L E ; 
 
         n C t s ; 
 
             S e t u p   h a r d w a r e   f l o w   c o n t r o l 
 
             1   - >   R T S   C O N T R O L   H A N D S H A K E ; 
 
             0   - >   R T S   C O N T R O L   E N A B L E ; 
 
         n X o n X o f f ; 
 
             S e t u p   s o f t w a r e   f l o w   c o n t r o l 
 
             0   - >   E n a b l e ; 
 
             1   - >   D i s a b l e ; 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ P r n c o m p o r t _ P C ( 0 ,   0 ,   0 ,   0 ,   0 ,   0 ,   0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ P r n c o m p o r t _ P C ( 0 ,   0 ,   0 ,   0 ,   0 ,   0 ,   0 ) 
 
 
 
 f    P  B _ S e t _ P r n c o m p o r t _ P C   Qxeg-[  P C   ^RW-[<PO9e  P C   vTepSh_j^RW
 
         -[<PYg
NTGR!qlpSh_j#c0dkQxe_(WQxe  B _ P r i n t _ O u t   KNMRWL0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ S p e e d ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[RpS^0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ S p e e d ( i n t   s p e e d ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ S p e e d ( B y V a l   s p e e d   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ S p e e d ( B y V a l   s p e e d   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         s p e e d ; 
 
             RpS^{
W0 ^7 0
 
             + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
             |   s p e e d   V a l u e   |   S P E E D                         | 
 
             + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
             |   0   o r   1             |   1   i p s   ( 2 5   m m p s )     | 
 
             + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
             |       2                   |   2   i p s   ( 5 0   m m p s )     | 
 
             + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
             |       3                   |   3   i p s   ( 7 5   m m p s )     | 
 
             + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
             |       4                   |   4   i p s   ( 1 0 0   m m p s )   | 
 
             + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
             |       5                   |   5   i p s   ( 1 2 5   m m p s )   | 
 
             + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
             |       6                   |   6   i p s   ( 1 5 0   m m p s )   | 
 
             + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
             |       7                   |   7   i p s   ( 1 7 5   m m p s )   | 
 
             + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ S p e e d ( 2 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ S p e e d ( 2 ) 
 
 
 
 f    P  B _ S e t _ S p e e d   Qxe-[RpS^0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ P r o c e s s D l g ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    _Ubܕ2^
\qFh0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ P r o c e s s D l g ( i n t   n S h o w ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ P r o c e s s D l g ( B y V a l   n S h o w   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ P r o c e s s D l g ( B y V a l   n S h o w   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n S h o w ; 
 
             0   - >   ܕ0
 
             1   - >   _U0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ P r o c e s s D l g ( 1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ P r o c e s s D l g ( 1 ) 
 
 
 
 f    P  B _ S e t _ P r o c e s s D l g   QxeSܕ2^
\qFh0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ E r r o r D l g ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    _Ubܕ͑fbOUz0
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ E r r o r D l g ( i n t   n S h o w ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ E r r o r D l g ( B y V a l   n S h o w   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ E r r o r D l g ( B y V a l   n S h o w   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n S h o w ; 
 
             0   - >   ܕ0
 
             1   - >   _U0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ E r r o r D l g ( 1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ E r r o r D l g ( 1 ) 
 
 
 
 f    P  B _ S e t _ E r r o r D l g   QxeSܕ͑fbOUz0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ B a r 2 d _ P D F 4 1 7 _ N ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NP  P D F - 4 1 7   2 D   B a r c o d e 0
 
 
 
 l
 
     V C : 
 
         i n t   B _ B a r 2 d _ P D F 4 1 7 _ N ( i n t   x ,   i n t   y ,   i n t   w ,   i n t   h ,   L P C T S T R   p P a r a m e t e r ,   L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ B a r 2 d _ P D F 4 1 7 _ N   L i b ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   w   A s   L o n g ,   B y V a l   h   A s   L o n g ,   B y V a l   p P a r a m e t e r   A s   S t r i n g ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ B a r 2 d _ P D F 4 1 7 _ N   L i b ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   w   A s   I n t e g e r ,   B y V a l   h   A s   I n t e g e r ,   B y V a l   p P a r a m e t e r   A s   S t r i n g ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         w ; 
 
              g'YRpS[^UMO  d o t s 0
 
         h ; 
 
              g'YRpSؚ^UMO  d o t s 0
 
         p P a r a m e t e r ; 
 
             vQNSυKNSxe, dkSxeSN/fN U L L 0
 
             /!hckI{}( s ) {
W0 ^8 0
 
             ǌeX.~I{}( c ) {
W0   b  1 0
 
             p r i n t   h u m a n   r e a d a b l e ( p x x x , y y y , m m ) 
 
             x x x : H u m a n   r e a d a b l e   h o r i z o n t a l   s t a r t   l o c a t i o n ,   0   ~   9 9 9 . 
 
             y y y :   H u m a n   r e a d a b l e   v e r t i c a l   s t a r t   l o c a t i o n ,   0   ~   9 9 9 . 
 
             m m : M a x i m u m   c h a r a c t e r s   p e r   l i n e ,   0   ~   9 9 . 
 
             f : B a r   c o d e   o r i g i n   p o i n t .   0 = U p p e r   l e f t   c o r n e r   o f   b a r c o d e ;   1 = C e n t e r   o f   b a r c o d e   ( d e f a u l t ) . 
 
             !jD}[^( x ) {
W2 ^9   d o t s 0
 
             !jD}ؚ^( y ) {
W4 ^9 9   d o t s 0
 
              g'Y  r o w   c o u n t ( r ) 0
 
              g'Y  c o l u m n   c o u n t ( l ) 0
 
             T r u n c a t i o n   f l a g ( t ) ' 0 '   /f  n o r m a l   T  ' 1 '   /f  t r u n c a t e d . 
 
             R o t a t i o n ( o ) ' 0 ' /f  0  ' 1 ' /f9 0  0' 2 ' /f1 8 0  ' 3 ' /f2 7 0  . 
 
         d a t a ; 
 
             ǌeW[2N0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ B a r 2 d _ P D F 4 1 7 _ N ( 1 0 , 1 0 , 4 0 0 , 3 0 0 , " s 0 , c 0 , p 4 0 0 , 4 0 0 , 1 0 , f 0 , x 3 , y 7 , r 1 0 , l 2 , f 0 " , " A R G O X I N F O " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ B a r 2 d _ P D F 4 1 7 _ N ( 1 0 ,   1 0 ,   4 0 0 ,   3 0 0 ,   " s 0 , c 0 , p 4 0 0 , 4 0 0 , 1 0 , f 0 , x 3 , y 7 , r 1 0 , l 2 , f 0 " ,   _ 
 
             " A R G O X I N F O " ) ; 
 
 
 
 f    P  B _ B a r 2 d _ P D F 4 1 7   QxeSNRpSQ NP  P D F - 4 1 7   2 D   B a r c o d e 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ R e s e t P r i n t e r ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    dkQxegOpSh_j͑e_j0
 
 
 
 l
 
     V C : 
 
         i n t   B _ R e s e t P r i n t e r ( ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ R e s e t P r i n t e r ( )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ R e s e t P r i n t e r ( )   A s   I n t e g e r 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ R e s e t P r i n t e r ( ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ R e s e t P r i n t e r ( ) 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ G e t P r i n t e r R e s p o n s e ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    dkQxe/fpSh_j	g/|vuBf(uOSpSh_j/Nx0
 
 
 
 l
 
     V C : 
 
         i n t   B _ G e t P r i n t e r R e s p o n s e ( c h a r   * p b u f ,   i n t   n M a x ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ G e t P r i n t e r R e s p o n s e ( B y V a l   p b u f   A s   S t r i n g ,   _ 
 
             B y V a l   n M a x   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ G e t P r i n t e r R e s p o n s e ( B y V a l   p b u f   A s   B y t e ( ) ,   _ 
 
             B y V a l   n M a x   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 PV<P
 
         @bS0Rvǌew^. 
 
 
 
 {O
 
     V C : 
 
         c h a r   * p b u f ,   t e m p [ 3 ] ; 
 
         i n t   n M a x   =   1 0 0 ; 
 
         p b u f   =   ( c h a r   * ) n e w   c h a r [ n M a x ] ; 
 
         B _ G e t P r i n t e r R e s p o n s e ( p b u f ,   n M a x ) ; 
 
 
 
         i f ( p b u f [ 0 ]   = =   ' \ x 1 5 ' ) { 
 
             m e m c p y ( t e m p ,   p b u f   +   1 ,   2 ) ; 
 
             n E r r o r   =   a t o i ( t e m p ) ; 
 
             i f ( n E r r o r   = =   1 ) 
 
                 A f x M e s s a g e B o x ( " C o m m a n d   p h r a s e   e r r o r " ) ; 
 
             e l s e   i f ( n E r r o r   = =   3 ) 
 
                 A f x M e s s a g e B o x ( " D a t a   e r r o r   f o r   b a r c o d e " ) ; 
 
             e l s e   i f ( n E r r o r   = =   4 ) 
 
                 A f x M e s s a g e B o x ( " M e m o r y   f u l l " ) ; 
 
             e l s e   i f ( n E r r o r   = =   7 ) 
 
                 A f x M e s s a g e B o x ( " M e d i a   o r   r i b b o n   o u t " ) ; 
 
             e l s e { 
 
                 s t r T e m p . F o r m a t ( " % d " ,   p b u f [ 1 ] ) ; 
 
                 A f x M e s s a g e B o x ( s t r T e m p ) ; 
 
             } 
 
         } 
 
     V B :   V B A : 
 
         D i m   p b u f   A s   S t r i n g 
 
         p b u f   =   S t r i n g $ ( 1 0 0 ,   v b N u l l C h a r ) 
 
         C a l l   B _ G e t P r i n t e r R e s p o n s e ( p b u f , 1 0 0 ) 
 
 
 
         I f   M i d ( p b u f , 1 , 1 )   =   C h r ( & H 1 5 )   T h e n 
 
             I f   M i d ( p b u f , 2 , 2 )   =   " 0 1 "   T h e n 
 
                 M s g B o x   " C o m m a n d   p h r a s e   e r r o r "     
 
             E l s e I f   M i d ( p b u f , 2 , 2 )   =   " 0 3 "   T h e n 
 
                 M s g B o x   " D a t a   e r r o r   f o r   b a r c o d e " 
 
             E l s e I f   M i d ( p b u f , 2 , 2 )   =   " 0 4 "   T h e n 
 
                 M s g B o x   " M e m o r y   f u l l " 
 
             E l s e I f   M i d ( p b u f , 2 , 2 )   =   " 0 7 "   T h e n 
 
                 M s g B o x   " M e d i a   o r   r i b b o n   o u t " 
 
             E l s e 
 
                 M s g B o x   " E r r o r   C o d e = "   &   M i d ( p b u f , 2 , 2 ) 
 
             E n d   I f 
 
         E n d   I f 
 
 
 
 R e m a r k   : 
 
         O(udkQxeMRHQ|TS  B _ E r r o r _ R e p o r t i n g ( ' S ' )   _URpSh_jVPR&TGRg!ql_0R
 
         /Nx. 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ T F e e d M o d e ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    dkQxeSOpSh_jRc0R  T   F e e d   !j_0
 
 
 
 l
 
     V C : 
 
         i n t   B _ T F e e d M o d e ( i n t   n M o d e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ T F e e d M o d e ( B y V a l   n M o d e   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ T F e e d M o d e ( B y V a l   n M o d e   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n M o d e ; 
 
             0   - >   N o r m a l . 
 
             1   - >   T   F e e d   M o d e . 
 
             
 
 PV<P
 
         0   - >   O K 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ T F e e d M o d e ( 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ T F e e d M o d e ( 0 ) 
 
 
 
 R e m a r k   :   dkQxePO(u(WX - 1 0 0 0 + NԎԚHr,gp" X 1 B 0 - 2 . 4 0 C " T" X 1 B 0 - 2 . 4 1 C 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ T F e e d T e s t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    vupSh_j(W  T   F e e d   !j_Bf, ZP}5_uP,n0
 
 
 
 l
 
     V C : 
 
         i n t   B _ T F e e d T e s t ( v o i d ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ T F e e d T e s t ( )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ T F e e d T e s t ( )   A s   I n t e g e r 
 
 
 
 PV<P
 
         0   - - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ T F e e d T e s t ( ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ T F e e d T e s t ( ) 
 
 
 
 R e m a r k   :   dkQxePO(u(WX - 1 0 0 0 + NԎԚHr,gp" X 1 B 0 - 2 . 4 0 C " T" X 1 B 0 - 2 . 4 1 C 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ E e x c u t e _ F o r m ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    RpS NP]X[(W>epSh_jgQv  F O R M   ( h<h) &N8eQ  F O R M   @b	gxe0xeǌe0
 
 
 
 l
 
     V C : 
 
         i n t   B _ E x e c u t e _ F o r m ( c h a r   f o r m _ o u t [ 1 0 ] ,   L P T S T R   v a r ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ E x e c u t e _ F o r m ( B y V a l   f o r m _ o u t   A s   S t r i n g ,   _ 
 
             B y V a l   v a r   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ E x e c u t e _ F o r m ( B y V a l   f o r m _ o u t   A s   S t r i n g ,   _ 
 
             B y V a l   v a r   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         f o r m _ o u t ; 
 
             h<h
T1zTeKNMR	eQv  F O R M   
T1zbSHQ2QX[(WpSh_jgQv  F O R M 0
 
         v a r ; 
 
             8eQ  F O R M   @b	gxe0xeǌe(u  " , " O^R%R@S0Ygxe	g" , " _
 
             S(u" ; , " ONh_0
 
 
 
 PV<P
 
         0   - - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ E x e c u t e _ F o r m ( " d e m o " ,   " 2 0 0 0 , B i c y c l e " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ E x e c u t e _ F o r m ( " d e m o " ,   " 2 0 0 0 , B i c y c l e " ) 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ B a r 2 d _ Q R ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    RpS  Q R   hx0
 
 
 
 l
 
     V C : 
 
         i n t   B _ B a r 2 d _ Q R ( i n t   x ,   i n t   y ,   i n t   m o d e l ,   i n t   s c l ,   c h a r   e r r o r ,   c h a r   d i n p u t ,   i n t   c , 
 
             i n t   d ,   i n t   p ,   L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ B a r 2 d _ Q R ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   B y V a l   m o d e l   A s   L o n g ,   _ 
 
             B y V a l   s c l   A s   L o n g ,   B y V a l   e r r   A s   B y t e ,   B y V a l   d i n p u t   A s   B y t e ,   B y V a l   c   A s   L o n g ,   _ 
 
             B y V a l   d   A s   L o n g ,   B y V a l   p   A s   L o n g ,   B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ B a r 2 d _ Q R ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   m o d e l   A s   I n t e g e r ,   B y V a l   s c l   A s   I n t e g e r ,   B y V a l   e r r   A s   B y t e ,   _ 
 
             B y V a l   d i n p u t   A s   B y t e ,   B y V a l   c   A s   I n t e g e r ,   B y V a l   d   A s   I n t e g e r ,   B y V a l   p   A s   I n t e g e r ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         m o d e l ; 
 
             Q R hx!j_{
W: 1 , 2   ( 
N&{{
WGRpSh_jgc(u-<P:   2 ) 0
 
         s c l ; 
 
             hx:\[{
W:   1 ~ 9 9   ( 
N&{{
WGRpSh_jgc(u-<P:   3 ) 0
 
         e r r o r ; 
 
             /!hckI{}0
 
             L   =   L o w e r   e r r o r   c o r r e c t i o n ,   m o s t   d a t a 
 
             M   =   D e f a u l t 
 
             Q   =   O p t i m i z e d   f o r   e r r o r   c o r r e c t i o n   o v e r   d a t a 
 
             H   =   H i g h e s t   e r r o r   c o r r e c t i o n ,   l a t e s t   d a t a 
 
             ( 
N&{{
WGRpSh_jgc(u-<P:   M ) 
 
         d i n p u t ; 
 
             ǌe8eQ!j_0
 
             A   =   R!j_  
 
             M   =   KbR!j_
 
             ( 
N&{{
WGRpSh_jgc(u-<P:   A ) 
 
         c , d , p ; 
 
             DR&{_0( 傊xe{
W
N&{GRgSmdkR) 
 
             + - - - - - - - - - - - - - + - - - - - + - - - - - - + 
 
             |         v          |   xe|   {
W  | 
 
             + - - - - - - - - - - - - - + - - - - - + - - - - - - + 
 
             | S y m b o l   N u m b e r |     c     |   1 ~ 1 6   | 
 
             + - - - - - - - - - - - - - + - - - - - + - - - - - - + 
 
             |     D i v i s i o n s     |     d     |   1 ~ 1 6   | 
 
             + - - - - - - - - - - - - - + - - - - - + - - - - - - + 
 
             |       P a r i t y         |     p     |   0 ~ 2 5 5 | 
 
             + - - - - - - - - - - - - - + - - - - - + - - - - - - +                                           
 
         d a t a ; 
 
             ǌeW[2N0
 
             Ygd i n p u t v<PpM ( KbR!j_) GRǌeW[2NvwYW[CQ_/fNRW[CQKN N  
 
             N   =   xeW[ǌe  
 
             A   =   W[kxeW[ǌe
 
             B x x x x   =   8 MOCQD}!j_" x x x x "   NhW[CQxeϑ0
 
                             ( !|Ԛ-NebA~Ԛ-Ne NPW[NhiQPW[CQ) 
 
             K = "oW[ǌe
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ B a r 2 d _ Q R ( 1 0 0 ,   1 0 0 ,   1 ,   3 ,   ' M ' ,   ' A ' ,   0 ,   0 ,   0 ,   " N 1 2 3 4 5 6 7 8 9 " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ B a r 2 d _ Q R ( 1 0 0 ,   1 0 0 ,   1 ,   3 ,   A s c ( " M " ) ,   A s c ( " A " ) ,   0 ,   0 ,   0 ,   " N 1 2 3 4 5 6 7 8 9 " ) 
 
 
 
 f    B _ B a r 2 d _ Q R   QxeSNRpS  Q R   hx0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ E n c r y p t i o n K e y ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R:   -[R[pSv<P0
 
 
 
 l: 
 
     V C : 
 
         i n t   B _ S e t _ E n c r y p t i o n K e y ( c h a r   e n c r y p t i o n K e y [ 1 6 ] ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ E n c r y p t i o n K e y ( B y V a l   e n c r y p t i o n K e y   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ E n c r y p t i o n K e y ( B y V a l   e n c r y p t i o n K e y   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe: 
 
         e n c r y p t i o n K e y ; 
 
             R[pSv<P,    1 6 PW[CQ,   vQW[CQv{
Wp0 x 2 1 0 x 7 E 0
 
 
 
 PV<P: 
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O: 
 
     V C : 
 
         B _ S e t _ E n c r y p t i o n K e y ( " k e y - 1 2 3 4 5 6 7 8 9 0 0 0 " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ E n c r y p t i o n K e y ( " k e y - 1 2 3 4 5 6 7 8 9 0 0 0 " ) 
 
 
 
 f:     dkQ_(uO-[R[pSv<P,   NgzsSPǌe,   &N\vQ<P2QX[pSh_j-N0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ C h e c k _ E n c r y p t i o n K e y ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    xR[pSvckx'`0
 
 
 
 l
 
     V C : 
 
         i n t   B _ C h e c k _ E n c r y p t i o n K e y ( c h a r   d e c o d e K e y [ 8 ] ,   c h a r   e n c r y p t i o n K e y [ 1 6 ] ,   D W O R D   d w T i m e o u t m s ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ C h e c k _ E n c r y p t i o n K e y ( B y V a l   d e c o d e K e y   A s   S t r i n g ,   B y V a l   e n c r y p t i o n K e y   A s   S t r i n g ,   _ 
 
             B y V a l   d w T i m e o u t m s   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ C h e c k _ E n c r y p t i o n K e y ( B y V a l   d e c o d e K e y   A s   S t r i n g ,   B y V a l   e n c r y p t i o n K e y   A s   S t r i n g ,   _ 
 
             B y V a l   d w T i m e o u t m s   A s   U L o n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         d e c o d e K e y ; 
 
             ㉼xpSv<P,    8 PW[CQ,   vQW[CQv{
Wp0 x 2 1 0 x 7 E 0
 
         e n c r y p t i o n K e y ; 
 
             R[pSv<P,    1 6 PW[CQ,   vQW[CQv{
Wp0 x 2 1 0 x 7 E 0
 
         d w T i m e o u t m s ; 
 
             xeBf,   _N1\/fSǌe gwvBf,   UMOpm s 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         i n t   r e t ; 
 
         r e t   =   B _ C h e c k _ E n c r y p t i o n K e y ( " t e s t - p a r " ,   " k e y - 1 2 3 4 5 6 7 8 9 0 0 0 " ,   1 0 0 0 ) ; / / 1   s e c o n d . 
 
     V B :   V B A : 
 
         D i m   r e t   A s   L o n g 
 
         r e t   =   B _ C h e c k _ E n c r y p t i o n K e y ( " t e s t - p a r " ,   " k e y - 1 2 3 4 5 6 7 8 9 0 0 0 " ,   1 0 0 0 )       ' 1   s e c o n d . 
 
     V B . n e t : 
 
         D i m   r e t   A s   I n t e g e r 
 
         r e t   =   B _ C h e c k _ E n c r y p t i o n K e y ( " t e s t - p a r " ,   " k e y - 1 2 3 4 5 6 7 8 9 0 0 0 " ,   1 0 0 0 )       ' 1   s e c o n d . 
 
 
 
 f    dkQ_(uOxR[pSvckx'`0\  d e c o d e K e y   v<PPpSh_j_,   
 
         TpSh_j-NvR[pSZPK{_VPK{P}g,   6q_T  d e c o d e K e y   S  e n c r y p t i o n K e y   
 
         v<PK{_vP}gZPk
\,   ww/f&TvT0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ C o m m T i m e o u t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R-[OvBf. 
 
 
 
 l
 
     V C : 
 
         v o i d   B _ S e t _ C o m m T i m e o u t ( i n t   R e a d T o t a l T i m e o u t C o n s t a n t ,   i n t   W r i t e T o t a l T i m e o u t C o n s t a n t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   S u b   B _ S e t _ C o m m T i m e o u t ( B y V a l   R e a d T o t a l T i m e o u t C o n s t a n t   A s   L o n g ,   _ 
 
             B y V a l   W r i t e T o t a l T i m e o u t C o n s t a n t   A s   L o n g ) 
 
     V B . n e t : 
 
         D e c l a r e   S u b   B _ S e t _ C o m m T i m e o u t ( B y V a l   R e a d T o t a l T i m e o u t C o n s t a n t   A s   I n t e g e r ,   _ 
 
             B y V a l   W r i t e T o t a l T i m e o u t C o n s t a n t   A s   I n t e g e r ) 
 
 
 
 Sxe
 
         R e a d T o t a l T i m e o u t C o n s t a n t ; 
 
             Sv>BfBf;   UMO  :   1   m s .   - 1   /f!qz'Y. 
 
         W r i t e T o t a l T i m e o u t C o n s t a n t ; 
 
             [eQv>BfBf;   UMO  :   1   m s .   - 1   /f!qz'Y. 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ C o m m T i m e o u t ( 0 ,   - 1 ) ; 
 
         B _ C r e a t e P r n ( 1 1 ,   N U L L ) ;   / / U S B 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ C o m m T i m e o u t ( 0 ,   - 1 ) 
 
         C a l l   B _ C r e a t e P r n ( 1 1 ,   n u l l )   ' U S B 
 
 
 
 f    dkQ_(uO-[S/ [eQv>BfBf.   
 
         Yg`O O(udkQ_,   dkQ_ (W  B _ C r e a t e P r n ( )   Q_MRWL. 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ G e t _ C o m m T i m e o u t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 RS_OvBf. 
 
 
 
 l
 
     V C : 
 
         v o i d   B _ G e t _ C o m m T i m e o u t ( i n t   * R e a d T o t a l T i m e o u t C o n s t a n t ,   i n t   * W r i t e T o t a l T i m e o u t C o n s t a n t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   S u b   B _ G e t _ C o m m T i m e o u t ( B y R e f   R e a d T o t a l T i m e o u t C o n s t a n t   A s   L o n g ,   _ 
 
             B y R e f   W r i t e T o t a l T i m e o u t C o n s t a n t   A s   L o n g ) 
 
     V B . n e t : 
 
         D e c l a r e   S u b   B _ G e t _ C o m m T i m e o u t ( B y R e f   R e a d T o t a l T i m e o u t C o n s t a n t   A s   I n t e g e r ,   _ 
 
             B y R e f   W r i t e T o t a l T i m e o u t C o n s t a n t   A s   I n t e g e r ) 
 
 
 
 Sxe
 
         R e a d T o t a l T i m e o u t C o n s t a n t ; 
 
             r e a d   t i m e o u t ;   u n i t   :   1   m s .   - 1   i s   i n f i n i t e . 
 
         W r i t e T o t a l T i m e o u t C o n s t a n t ; 
 
             w r i t e   t i m e o u t ;   u n i t   :   1   m s .   - 1   i s   i n f i n i t e . 
 
 
 
 {O
 
     V C : 
 
         i n t   R e a d T o t a l T i m e o u t C o n s t a n t ,   W r i t e T o t a l T i m e o u t C o n s t a n t ; 
 
         B _ G e t _ C o m m T i m e o u t ( & R e a d T o t a l T i m e o u t C o n s t a n t ,   & W r i t e T o t a l T i m e o u t C o n s t a n t ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         D i m   R e a d T o t a l T i m e o u t C o n s t a n t ,   W r i t e T o t a l T i m e o u t C o n s t a n t   A s   L o n g 
 
         C a l l   B _ G e t _ C o m m T i m e o u t ( R e a d T o t a l T i m e o u t C o n s t a n t ,   W r i t e T o t a l T i m e o u t C o n s t a n t ) 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 B _ S e t _ L a b e l F o r S m a r t P r i n t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R  -[  S m a r t   P r i n t   -N@b vǌ
. 
 
 
 
 l
 
     V C : 
 
         i n t   B _ S e t _ L a b e l F o r S m a r t P r i n t ( i n t   l a b l e n g t h ,   i n t   g a p l e n g t h ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ L a b e l F o r S m a r t P r i n t ( B y V a l   l a b l e n g t h   A s   L o n g ,   _ 
 
             B y V a l   g a p l e n g t h   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   B _ S e t _ L a b e l F o r S m a r t P r i n t ( B y V a l   l a b l e n g t h   A s   I n t e g e r ,   _ 
 
             B y V a l   g a p l e n g t h   A s   I n t e g e r )   A s   I n t e g e r 
 
             
 
 Sxe
 
         l a b l e n g t h ; 
 
             jd|w^0UMO  :   0 . 1   lQS0
 
         g a p l e n g t h ; 
 
             G A P   w^0UMO  :   0 . 1   lQS0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   B W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         B _ S e t _ L a b e l F o r S m a r t P r i n t ( 7 6 2 ,   3 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   B _ S e t _ L a b e l F o r S m a r t P r i n t ( 7 6 2 ,   3 0 ) 
 
 
 
 f    P  B _ S e t _ L a b e l F o r S m a r t P r i n t   Qxe(uO-[  S m a r t   P r i n t   @b vjd|w^S  G A P   w^iQPǌ
0
 
 